From 92cb6add9f9e1a95285d9db9aee6e8172e0d6b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Czy=C5=BC?= Date: Wed, 23 Mar 2016 00:53:33 +0000 Subject: [PATCH] usb-modeswitch-data: init at 20160112 --- .../tools/misc/usb-modeswitch/data.nix | 29 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 30 insertions(+) create mode 100644 pkgs/development/tools/misc/usb-modeswitch/data.nix diff --git a/pkgs/development/tools/misc/usb-modeswitch/data.nix b/pkgs/development/tools/misc/usb-modeswitch/data.nix new file mode 100644 index 000000000000..91b343b20b4c --- /dev/null +++ b/pkgs/development/tools/misc/usb-modeswitch/data.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchurl, pkgconfig, libusb1, usb-modeswitch }: + +let + version = "20160112"; +in + +stdenv.mkDerivation rec { + name = "usb-modeswitch-data-${version}"; + + src = fetchurl { + url = "http://www.draisberghof.de/usb_modeswitch/${name}.tar.bz2"; + sha256 = "19yzqv0592b9mwgdi7apzw881q70ajyx5d56zr1z5ldi915a8yfn"; + }; + + # make clean: we always build from source. It should be necessary on x86_64 only + prePatch = '' + sed -i 's@usb_modeswitch@${usb-modeswitch}/bin/usb_modeswitch@g' 40-usb_modeswitch.rules + sed -i "1 i\DESTDIR=$out" Makefile + ''; + + buildInputs = [ pkgconfig libusb1 usb-modeswitch ]; + + meta = { + description = "device database and the rules file for 'multi-mode' USB devices"; + license = stdenv.lib.licenses.gpl2; + maintainers = [ stdenv.lib.maintainers.marcweber ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 154d77e0ed73..b5e6bc31e6a0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1069,6 +1069,7 @@ in "unionfs-fuse" = callPackage ../tools/filesystems/unionfs-fuse { }; usb-modeswitch = callPackage ../development/tools/misc/usb-modeswitch { }; + usb-modeswitch-data = callPackage ../development/tools/misc/usb-modeswitch/data.nix { }; anthy = callPackage ../tools/inputmethods/anthy { };