about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libusb1
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-04-01 15:50:50 +0000
committerAlyssa Ross <hi@alyssa.is>2020-04-01 15:50:50 +0000
commit75eafe97f7df0d653bec67f3962214d7c357831f (patch)
tree09f2cc901e0e637876cbb78d192dfe2fcfef8156 /nixpkgs/pkgs/development/libraries/libusb1
parenta53b121bf4331497da63df3b1b7f1a7897dad146 (diff)
parenta2e06fc3423c4be53181b15c28dfbe0bcf67dd73 (diff)
downloadnixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar
nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.gz
nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.bz2
nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.lz
nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.xz
nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.tar.zst
nixlib-75eafe97f7df0d653bec67f3962214d7c357831f.zip
Merge commit 'a2e06fc3423c4be53181b15c28dfbe0bcf67dd73'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libusb1')
-rw-r--r--nixpkgs/pkgs/development/libraries/libusb1/default.nix23
1 files changed, 12 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libusb1/default.nix b/nixpkgs/pkgs/development/libraries/libusb1/default.nix
index 9d90304042c8..650238141718 100644
--- a/nixpkgs/pkgs/development/libraries/libusb1/default.nix
+++ b/nixpkgs/pkgs/development/libraries/libusb1/default.nix
@@ -1,5 +1,6 @@
 { stdenv
-, fetchurl
+, fetchFromGitHub
+, autoreconfHook
 , pkgconfig
 , enableSystemd ? stdenv.isLinux && !stdenv.hostPlatform.isMusl
 , systemd ? null
@@ -10,22 +11,26 @@
 
 assert enableSystemd -> systemd != null;
 
-stdenv.mkDerivation (rec {
+stdenv.mkDerivation rec {
   pname = "libusb";
   version = "1.0.23";
 
-  src = fetchurl {
-    url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2";
-    sha256 = "13dd2a9x290d1q8nb1lqiaf36grcvns5ripk5k2xm0lajmpc04fv";
+  src = fetchFromGitHub {
+    owner = "libusb";
+    repo = "libusb";
+    rev = "v${version}";
+    sha256 = "0mxbpg01kgbk5nh6524b0m4xk7ywkyzmc3yhi5asqcsd3rbhjj98";
   };
 
   outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig autoreconfHook ];
   propagatedBuildInputs =
     stdenv.lib.optional enableSystemd systemd ++
     stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ];
 
+  dontDisableStatic = withStatic;
+
   NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
 
   preFixup = stdenv.lib.optionalString stdenv.isLinux ''
@@ -43,8 +48,4 @@ stdenv.mkDerivation (rec {
     license = licenses.lgpl21Plus;
     maintainers = [ ];
   };
-} // stdenv.lib.optionalAttrs withStatic {
-  # Carefully added here to avoid a mass rebuild.
-  # Inline this the next time this package changes.
-  dontDisableStatic = withStatic;
-})
+}