diff options
author | Teal Gaure <~@Teal.Gr> | 2017-10-04 17:11:52 +0200 |
---|---|---|
committer | Teal Gaure <~@Teal.Gr> | 2017-10-04 17:11:52 +0200 |
commit | ed35c0761fe2433eb1a2187eea3b4ad488f817da (patch) | |
tree | 7b355e8d185a1d075911d58c9fa758181a37e4fd /pkgs/applications/audio/axoloti/libusb1.nix | |
parent | 2b70f5e251e39a4dfb7150362dcb12f08e0ee6b3 (diff) | |
download | nixpkgs-ed35c0761fe2433eb1a2187eea3b4ad488f817da.tar nixpkgs-ed35c0761fe2433eb1a2187eea3b4ad488f817da.tar.gz nixpkgs-ed35c0761fe2433eb1a2187eea3b4ad488f817da.tar.bz2 nixpkgs-ed35c0761fe2433eb1a2187eea3b4ad488f817da.tar.lz nixpkgs-ed35c0761fe2433eb1a2187eea3b4ad488f817da.tar.xz nixpkgs-ed35c0761fe2433eb1a2187eea3b4ad488f817da.tar.zst nixpkgs-ed35c0761fe2433eb1a2187eea3b4ad488f817da.zip |
axoloti: init at 1.0.12-1
Diffstat (limited to 'pkgs/applications/audio/axoloti/libusb1.nix')
-rw-r--r-- | pkgs/applications/audio/axoloti/libusb1.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/applications/audio/axoloti/libusb1.nix b/pkgs/applications/audio/axoloti/libusb1.nix new file mode 100644 index 00000000000..cf71c006046 --- /dev/null +++ b/pkgs/applications/audio/axoloti/libusb1.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit, fetchpatch }: + +stdenv.mkDerivation rec { + name = "libusb-1.0.19"; + + src = fetchurl { + url = "mirror://sourceforge/libusb/${name}.tar.bz2"; + sha256 = "0h38p9rxfpg9vkrbyb120i1diq57qcln82h5fr7hvy82c20jql3c"; + }; + + outputs = [ "out" "dev" ]; # get rid of propagating systemd closure + + buildInputs = [ pkgconfig ]; + propagatedBuildInputs = + stdenv.lib.optional stdenv.isLinux systemd ++ + stdenv.lib.optionals stdenv.isDarwin [ libobjc IOKit ]; + + patches = [ + (fetchpatch { + name = "libusb.stdfu.patch"; + url = "https://raw.githubusercontent.com/axoloti/axoloti/1.0.12/platform_linux/src/libusb.stdfu.patch"; + sha256 = "194j7j61i4q6x0ihm9ms8dxd4vliw20n2rj6cm9h17qzdl9xr33d"; + }) + ]; + + NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s"; + + preFixup = stdenv.lib.optionalString stdenv.isLinux '' + sed 's,-ludev,-L${systemd.lib}/lib -ludev,' -i $out/lib/libusb-1.0.la + ''; + + meta = { + homepage = http://www.libusb.info; + description = "User-space USB library"; + platforms = stdenv.lib.platforms.unix; + maintainers = [ ]; + }; +} |