diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-10-02 10:24:41 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-10-02 10:24:41 +0200 |
commit | 33373d939a19f465228ddede6d38ce9032b5916b (patch) | |
tree | e1e767d2274e689db4e7f6fb4150b5fc5f46a730 /pkgs/os-specific | |
parent | b23038dd801fcbfad2980664758d820b29abebae (diff) | |
parent | d1047f7c12bb8097007fc644ea4bebcecbb1b934 (diff) | |
download | nixpkgs-33373d939a19f465228ddede6d38ce9032b5916b.tar nixpkgs-33373d939a19f465228ddede6d38ce9032b5916b.tar.gz nixpkgs-33373d939a19f465228ddede6d38ce9032b5916b.tar.bz2 nixpkgs-33373d939a19f465228ddede6d38ce9032b5916b.tar.lz nixpkgs-33373d939a19f465228ddede6d38ce9032b5916b.tar.xz nixpkgs-33373d939a19f465228ddede6d38ce9032b5916b.tar.zst nixpkgs-33373d939a19f465228ddede6d38ce9032b5916b.zip |
Merge: staging with systemd
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/kernel/common-config.nix | 2 | ||||
-rw-r--r-- | pkgs/os-specific/linux/libcap-ng/default.nix | 34 |
2 files changed, 26 insertions, 10 deletions
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index ef35757fdb2..218532a695e 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -478,8 +478,6 @@ with stdenv.lib; ''} ZRAM m - ${optionalString (versionAtLeast version "3.17") "NFC? n"} - # Enable firmware loading via udev (legacy). ${optionalString (versionAtLeast version "3.17") '' FW_LOADER_USER_HELPER_FALLBACK y diff --git a/pkgs/os-specific/linux/libcap-ng/default.nix b/pkgs/os-specific/linux/libcap-ng/default.nix index 3670f06e543..ea54f1a39fd 100644 --- a/pkgs/os-specific/linux/libcap-ng/default.nix +++ b/pkgs/os-specific/linux/libcap-ng/default.nix @@ -1,22 +1,40 @@ -{ stdenv, fetchurl, python }: +{ stdenv, fetchurl, swig ? null, python2 ? null, python3 ? null }: -assert stdenv.isLinux; +assert python2 != null || python3 != null -> swig != null; stdenv.mkDerivation rec { name = "libcap-ng-${version}"; - version = "0.7.3"; + # When updating make sure to test that the version with + # all of the python bindings still works + version = "0.7.7"; src = fetchurl { url = "${meta.homepage}/${name}.tar.gz"; - sha256 = "1cavlcrpqi4imkmagjhw65br8rv2fsbhf68mm3lczr51sg44392w"; + sha256 = "0syhyrixk7fqvwis3k7iddn75g0qxysc1q5fifvzccxk7774jmb1"; }; - buildInputs = [ python ]; # ToDo? optional swig for python bindings + nativeBuildInputs = [ swig ]; + buildInputs = [ python2 python3 ]; - meta = { + postPatch = '' + function get_header() { + echo -e "#include <$1>" | gcc -M -xc - | tr ' ' '\n' | grep "$1" | head -n 1 + } + + # Fix some hardcoding of header paths + sed -i "s,/usr/include/linux/capability.h,$(get_header linux/capability.h),g" bindings/python{,3}/Makefile.in + ''; + + configureFlags = [ + (if python2 != null then "--with-python" else "--without-python") + (if python3 != null then "--with-python3" else "--without-python3") + ]; + + meta = let inherit (stdenv.lib) platforms licenses maintainers; in { description = "Library for working with POSIX capabilities"; homepage = http://people.redhat.com/sgrubb/libcap-ng/; - platforms = stdenv.lib.platforms.linux; - license = stdenv.lib.licenses.lgpl21; + platforms = platforms.linux; + license = licenses.lgpl21; + maintainers = with maintainers; [ wkennington ]; }; } |