about summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-03-09 10:30:33 +0000
committerGitHub <noreply@github.com>2020-03-09 10:30:33 +0000
commit9f55c5e37c2872462c17d2437d6a831b376932d7 (patch)
tree1245b85b8e076348991a7de6bd62fc3372db9d14 /pkgs/development/libraries
parent824635fa6107b3dabe41415321b1414358497ddf (diff)
parentaa63d51a34d0b171516227f945209f0c5b559d62 (diff)
downloadnixlib-9f55c5e37c2872462c17d2437d6a831b376932d7.tar
nixlib-9f55c5e37c2872462c17d2437d6a831b376932d7.tar.gz
nixlib-9f55c5e37c2872462c17d2437d6a831b376932d7.tar.bz2
nixlib-9f55c5e37c2872462c17d2437d6a831b376932d7.tar.lz
nixlib-9f55c5e37c2872462c17d2437d6a831b376932d7.tar.xz
nixlib-9f55c5e37c2872462c17d2437d6a831b376932d7.tar.zst
nixlib-9f55c5e37c2872462c17d2437d6a831b376932d7.zip
Merge pull request #48434 from lschuermann/libusb-mirror
libusb-compat: 0.1.5 -> 0.1.7 && change libusb source to GitHub
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/libusb/default.nix17
-rw-r--r--pkgs/development/libraries/libusb1/default.nix23
2 files changed, 22 insertions, 18 deletions
diff --git a/pkgs/development/libraries/libusb/default.nix b/pkgs/development/libraries/libusb/default.nix
index adf354c45f2e..681b2eef456c 100644
--- a/pkgs/development/libraries/libusb/default.nix
+++ b/pkgs/development/libraries/libusb/default.nix
@@ -1,17 +1,20 @@
-{stdenv, fetchurl, pkgconfig, libusb1}:
+{stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libusb1}:
 
-stdenv.mkDerivation {
-  name = "libusb-compat-0.1.5";
+stdenv.mkDerivation rec {
+  name = "libusb-compat-${version}";
+  version = "0.1.7";
 
   outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
   outputBin = "dev";
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig autoreconfHook ];
   propagatedBuildInputs = [ libusb1 ];
 
-  src = fetchurl {
-    url = mirror://sourceforge/libusb/libusb-compat-0.1.5.tar.bz2;
-    sha256 = "0nn5icrfm9lkhzw1xjvaks9bq3w6mjg86ggv3fn7kgi4nfvg8kj0";
+  src = fetchFromGitHub {
+    owner = "libusb";
+    repo = "libusb-compat-0.1";
+    rev = "v${version}";
+    sha256 = "1nybccgjs14b3phhaycq2jx1gym4nf6sghvnv9qdfmlqxacx0jz5";
   };
 
   patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ./fix-headers.patch;
diff --git a/pkgs/development/libraries/libusb1/default.nix b/pkgs/development/libraries/libusb1/default.nix
index 9d90304042c8..650238141718 100644
--- a/pkgs/development/libraries/libusb1/default.nix
+++ b/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;
-})
+}