pkgs/os-specific: stdenv.lib -> lib

This commit is contained in:
Ben Siraphob 2021-01-15 21:45:37 +07:00
parent 979e6e67d3
commit 16d91ee628
212 changed files with 597 additions and 599 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }: { lib, stdenv, fetchurl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "DarwinTools-1"; name = "DarwinTools-1";
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
''; '';
meta = { meta = {
maintainers = [ stdenv.lib.maintainers.matthewbauer ]; maintainers = [ lib.maintainers.matthewbauer ];
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
}; };
} }

View File

@ -176,7 +176,7 @@ let
setupHook = ./framework-setup-hook.sh; setupHook = ./framework-setup-hook.sh;
# Not going to be more specific than this for now # Not going to be more specific than this for now
__propagatedImpureHostDeps = stdenv.lib.optionals (name != "Kernel") [ __propagatedImpureHostDeps = lib.optionals (name != "Kernel") [
# The setup-hook ensures that everyone uses the impure CoreFoundation who uses these SDK frameworks, so let's expose it # The setup-hook ensures that everyone uses the impure CoreFoundation who uses these SDK frameworks, so let's expose it
"/System/Library/Frameworks/CoreFoundation.framework" "/System/Library/Frameworks/CoreFoundation.framework"
"/System/Library/Frameworks/${name}.framework" "/System/Library/Frameworks/${name}.framework"
@ -249,42 +249,42 @@ in rec {
}; };
overrides = super: { overrides = super: {
AppKit = stdenv.lib.overrideDerivation super.AppKit (drv: { AppKit = lib.overrideDerivation super.AppKit (drv: {
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [ __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [
"/System/Library/PrivateFrameworks/" "/System/Library/PrivateFrameworks/"
]; ];
}); });
Carbon = stdenv.lib.overrideDerivation super.Carbon (drv: { Carbon = lib.overrideDerivation super.Carbon (drv: {
extraTBDFiles = [ "Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering.tbd" ]; extraTBDFiles = [ "Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering.tbd" ];
}); });
CoreFoundation = stdenv.lib.overrideDerivation super.CoreFoundation (drv: { CoreFoundation = lib.overrideDerivation super.CoreFoundation (drv: {
setupHook = ./cf-setup-hook.sh; setupHook = ./cf-setup-hook.sh;
}); });
CoreMedia = stdenv.lib.overrideDerivation super.CoreMedia (drv: { CoreMedia = lib.overrideDerivation super.CoreMedia (drv: {
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [ __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [
"/System/Library/Frameworks/CoreImage.framework" "/System/Library/Frameworks/CoreImage.framework"
]; ];
}); });
CoreMIDI = stdenv.lib.overrideDerivation super.CoreMIDI (drv: { CoreMIDI = lib.overrideDerivation super.CoreMIDI (drv: {
__propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [ __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [
"/System/Library/PrivateFrameworks/" "/System/Library/PrivateFrameworks/"
]; ];
setupHook = ./private-frameworks-setup-hook.sh; setupHook = ./private-frameworks-setup-hook.sh;
}); });
IMServicePlugIn = stdenv.lib.overrideDerivation super.IMServicePlugIn (drv: { IMServicePlugIn = lib.overrideDerivation super.IMServicePlugIn (drv: {
extraTBDFiles = [ "Versions/A/Frameworks/IMServicePlugInSupport.framework/Versions/A/IMServicePlugInSupport.tbd" ]; extraTBDFiles = [ "Versions/A/Frameworks/IMServicePlugInSupport.framework/Versions/A/IMServicePlugInSupport.tbd" ];
}); });
Security = stdenv.lib.overrideDerivation super.Security (drv: { Security = lib.overrideDerivation super.Security (drv: {
setupHook = ./security-setup-hook.sh; setupHook = ./security-setup-hook.sh;
}); });
QuartzCore = stdenv.lib.overrideDerivation super.QuartzCore (drv: { QuartzCore = lib.overrideDerivation super.QuartzCore (drv: {
installPhase = drv.installPhase + '' installPhase = drv.installPhase + ''
f="$out/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h" f="$out/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h"
substituteInPlace "$f" \ substituteInPlace "$f" \
@ -292,14 +292,14 @@ in rec {
''; '';
}); });
MetalKit = stdenv.lib.overrideDerivation super.MetalKit (drv: { MetalKit = lib.overrideDerivation super.MetalKit (drv: {
installPhase = drv.installPhase + '' installPhase = drv.installPhase + ''
mkdir -p $out/include/simd mkdir -p $out/include/simd
cp ${lib.getDev sdk}/include/simd/*.h $out/include/simd/ cp ${lib.getDev sdk}/include/simd/*.h $out/include/simd/
''; '';
}); });
WebKit = stdenv.lib.overrideDerivation super.WebKit (drv: { WebKit = lib.overrideDerivation super.WebKit (drv: {
extraTBDFiles = [ extraTBDFiles = [
"Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore.tbd" "Versions/A/Frameworks/WebCore.framework/Versions/A/WebCore.tbd"
"Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy.tbd" "Versions/A/Frameworks/WebKitLegacy.framework/Versions/A/WebKitLegacy.tbd"
@ -307,7 +307,7 @@ in rec {
}); });
} // lib.genAttrs [ "ContactsPersistence" "UIFoundation" "GameCenter" ] (x: tbdOnlyFramework x {}); } // lib.genAttrs [ "ContactsPersistence" "UIFoundation" "GameCenter" ] (x: tbdOnlyFramework x {});
bareFrameworks = stdenv.lib.mapAttrs framework (import ./frameworks.nix { bareFrameworks = lib.mapAttrs framework (import ./frameworks.nix {
inherit frameworks libs; inherit frameworks libs;
inherit (pkgs.darwin) libobjc; inherit (pkgs.darwin) libobjc;
}); });

View File

@ -1,8 +1,8 @@
{ stdenv, libyaml }: { lib, stdenv, libyaml }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "print-reexports"; name = "print-reexports";
src = stdenv.lib.sourceFilesBySuffices ./. [".c"]; src = lib.sourceFilesBySuffices ./. [".c"];
buildInputs = [ libyaml ]; buildInputs = [ libyaml ];

View File

@ -2,7 +2,7 @@
# Someday it'll make sense to split these out into their own packages, but today is not that day. # Someday it'll make sense to split these out into their own packages, but today is not that day.
appleDerivation { appleDerivation {
srcs = stdenv.lib.attrValues IOKitSrcs; srcs = lib.attrValues IOKitSrcs;
sourceRoot = "."; sourceRoot = ".";
phases = [ "unpackPhase" "installPhase" ]; phases = [ "unpackPhase" "installPhase" ];

View File

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, fetchzip, bsdmake, perl, flex, yacc { lib, stdenv, appleDerivation, fetchzip, bsdmake, perl, flex, yacc
}: }:
# this derivation sucks # this derivation sucks
@ -85,7 +85,7 @@ in appleDerivation {
setOutputFlags = false; setOutputFlags = false;
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ gridaphobe ]; maintainers = with lib.maintainers; [ gridaphobe ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, xcbuild, ncurses, libutil }: { lib, stdenv, appleDerivation, xcbuild, ncurses, libutil }:
appleDerivation { appleDerivation {
# We can't just run the root build, because https://github.com/facebook/xcbuild/issues/264 # We can't just run the root build, because https://github.com/facebook/xcbuild/issues/264
@ -45,7 +45,7 @@ appleDerivation {
buildInputs = [ ncurses libutil ]; buildInputs = [ ncurses libutil ];
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; maintainers = with lib.maintainers; [ matthewbauer ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, xcbuildHook }: { lib, stdenv, appleDerivation, xcbuildHook }:
appleDerivation { appleDerivation {
nativeBuildInputs = [ xcbuildHook ]; nativeBuildInputs = [ xcbuildHook ];
@ -26,7 +26,7 @@ appleDerivation {
''; '';
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; maintainers = with lib.maintainers; [ matthewbauer ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, yacc, flex }: { lib, stdenv, appleDerivation, yacc, flex }:
appleDerivation { appleDerivation {
nativeBuildInputs = [ yacc flex ]; nativeBuildInputs = [ yacc flex ];
@ -44,6 +44,6 @@ appleDerivation {
''; '';
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, makeWrapper }: { lib, stdenv, appleDerivation, makeWrapper }:
appleDerivation { appleDerivation {
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
@ -44,6 +44,6 @@ appleDerivation {
''; '';
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchzip, pkgs }: { lib, stdenv, fetchurl, fetchzip, pkgs }:
let let
# This attrset can in theory be computed automatically, but for that to work nicely we need # This attrset can in theory be computed automatically, but for that to work nicely we need
@ -152,7 +152,7 @@ let
name = "${name}-${version}"; name = "${name}-${version}";
enableParallelBuilding = true; enableParallelBuilding = true;
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
}; };
} // (if attrs ? srcs then {} else { } // (if attrs ? srcs then {} else {
src = fetchApple version sha256 name; src = fetchApple version sha256 name;
@ -160,7 +160,7 @@ let
applePackage = namePath: version: sha256: applePackage = namePath: version: sha256:
let let
name = builtins.elemAt (stdenv.lib.splitString "/" namePath) 0; name = builtins.elemAt (lib.splitString "/" namePath) 0;
appleDerivation = appleDerivation_ name version sha256; appleDerivation = appleDerivation_ name version sha256;
callPackage = pkgs.newScope (packages // pkgs.darwin // { inherit appleDerivation name version; }); callPackage = pkgs.newScope (packages // pkgs.darwin // { inherit appleDerivation name version; });
in callPackage (./. + "/${namePath}"); in callPackage (./. + "/${namePath}");
@ -187,7 +187,7 @@ let
# There should be an IOVideo here, but they haven't released it :( # There should be an IOVideo here, but they haven't released it :(
}; };
IOKitSrcs = stdenv.lib.mapAttrs (name: value: if stdenv.lib.isFunction value then value name else value) IOKitSpecs; IOKitSrcs = lib.mapAttrs (name: value: if lib.isFunction value then value name else value) IOKitSpecs;
# Only used for bootstrapping. Its convenient because it was the last version to come with a real makefile. # Only used for bootstrapping. Its convenient because it was the last version to come with a real makefile.
adv_cmds-boot = applePackage "adv_cmds/boot.nix" "osx-10.5.8" "102ssayxbg9wb35mdmhswbnw0bg7js3pfd8fcbic83c5q3bqa6c6" {}; adv_cmds-boot = applePackage "adv_cmds/boot.nix" "osx-10.5.8" "102ssayxbg9wb35mdmhswbnw0bg7js3pfd8fcbic83c5q3bqa6c6" {};

View File

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, xcbuildHook, llvmPackages }: { lib, stdenv, appleDerivation, xcbuildHook, llvmPackages }:
appleDerivation { appleDerivation {
nativeBuildInputs = [ xcbuildHook ]; nativeBuildInputs = [ xcbuildHook ];
@ -30,7 +30,7 @@ appleDerivation {
''; '';
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; maintainers = with lib.maintainers; [ matthewbauer ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, xcbuildHook { lib, stdenv, appleDerivation, xcbuildHook
, Libc, xnu, libutil }: , Libc, xnu, libutil }:
appleDerivation { appleDerivation {
@ -32,7 +32,7 @@ appleDerivation {
''; '';
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; maintainers = with lib.maintainers; [ matthewbauer ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, xcbuildHook, zlib, bzip2, lzma, ncurses, libutil }: { lib, stdenv, appleDerivation, xcbuildHook, zlib, bzip2, lzma, ncurses, libutil }:
appleDerivation { appleDerivation {
nativeBuildInputs = [ xcbuildHook ]; nativeBuildInputs = [ xcbuildHook ];
@ -32,7 +32,7 @@ appleDerivation {
''; '';
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; maintainers = with lib.maintainers; [ matthewbauer ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, libdispatch, xnu }: { lib, stdenv, appleDerivation, libdispatch, xnu }:
appleDerivation { appleDerivation {
propagatedBuildInputs = [ libdispatch xnu ]; propagatedBuildInputs = [ libdispatch xnu ];
@ -16,6 +16,6 @@ appleDerivation {
''; '';
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, xcbuildHook { lib, stdenv, appleDerivation, xcbuildHook
, openssl_1_0_2, Librpcsvc, xnu, libpcap, developer_cmds }: , openssl_1_0_2, Librpcsvc, xnu, libpcap, developer_cmds }:
appleDerivation { appleDerivation {
@ -44,7 +44,7 @@ appleDerivation {
''; '';
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; maintainers = with lib.maintainers; [ matthewbauer ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, xcbuildHook }: { lib, stdenv, appleDerivation, xcbuildHook }:
appleDerivation { appleDerivation {
nativeBuildInputs = [ xcbuildHook ]; nativeBuildInputs = [ xcbuildHook ];
@ -44,7 +44,7 @@ appleDerivation {
''; '';
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; maintainers = with lib.maintainers; [ matthewbauer ];
}; };
} }

View File

@ -98,7 +98,7 @@ appleDerivation {
''; '';
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ shlevy matthewbauer ]; maintainers = with lib.maintainers; [ shlevy matthewbauer ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, appleDerivation, xcbuildHook, ncurses, bzip2, zlib, lzma }: { lib, stdenv, appleDerivation, xcbuildHook, ncurses, bzip2, zlib, lzma }:
appleDerivation { appleDerivation {
nativeBuildInputs = [ xcbuildHook ]; nativeBuildInputs = [ xcbuildHook ];
@ -21,7 +21,7 @@ appleDerivation {
''; '';
meta = { meta = {
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; maintainers = with lib.maintainers; [ matthewbauer ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, binutils-unwrapped, cctools, llvm }: { lib, stdenv, binutils-unwrapped, cctools, llvm }:
# Make sure both underlying packages claim to have prepended their binaries # Make sure both underlying packages claim to have prepended their binaries
# with the same targetPrefix. # with the same targetPrefix.
@ -32,7 +32,7 @@ stdenv.mkDerivation {
# - strip: the binutils one seems to break mach-o files # - strip: the binutils one seems to break mach-o files
# - lipo: gcc build assumes it exists # - lipo: gcc build assumes it exists
# - nm: the gnu one doesn't understand many new load commands # - nm: the gnu one doesn't understand many new load commands
for i in ${stdenv.lib.concatStringsSep " " (builtins.map (e: targetPrefix + e) cmds)}; do for i in ${lib.concatStringsSep " " (builtins.map (e: targetPrefix + e) cmds)}; do
ln -sf "${cctools}/bin/$i" "$out/bin/$i" ln -sf "${cctools}/bin/$i" "$out/bin/$i"
done done
@ -56,7 +56,7 @@ stdenv.mkDerivation {
}; };
meta = { meta = {
maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; maintainers = with lib.maintainers; [ matthewbauer ];
priority = 10; priority = 10;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoconf, automake, libtool, autoreconfHook { lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, autoreconfHook
, installShellFiles , installShellFiles
, libcxxabi, libuuid , libcxxabi, libuuid
, libobjc ? null, maloader ? null , libobjc ? null, maloader ? null
@ -9,7 +9,7 @@ let
# The targetPrefix prepended to binary names to allow multiple binuntils on the # The targetPrefix prepended to binary names to allow multiple binuntils on the
# PATH to both be usable. # PATH to both be usable.
targetPrefix = stdenv.lib.optionalString targetPrefix = lib.optionalString
(stdenv.targetPlatform != stdenv.hostPlatform) (stdenv.targetPlatform != stdenv.hostPlatform)
"${stdenv.targetPlatform.config}-"; "${stdenv.targetPlatform.config}-";
in in
@ -32,8 +32,8 @@ stdenv.mkDerivation {
nativeBuildInputs = [ autoconf automake libtool autoreconfHook installShellFiles ]; nativeBuildInputs = [ autoconf automake libtool autoreconfHook installShellFiles ];
buildInputs = [ libuuid ] buildInputs = [ libuuid ]
++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ] ++ lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]
++ stdenv.lib.optional enableTapiSupport libtapi; ++ lib.optional enableTapiSupport libtapi;
patches = [ ./ld-ignore-rpath-link.patch ./ld-rpath-nonfinal.patch ]; patches = [ ./ld-ignore-rpath-link.patch ./ld-rpath-nonfinal.patch ];
@ -47,14 +47,14 @@ stdenv.mkDerivation {
# TODO(@Ericson2314): Always pass "--target" and always targetPrefix. # TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
configurePlatforms = [ "build" "host" ] configurePlatforms = [ "build" "host" ]
++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target"; ++ lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";
configureFlags = [ "--disable-clang-as" ] configureFlags = [ "--disable-clang-as" ]
++ stdenv.lib.optionals enableTapiSupport [ ++ lib.optionals enableTapiSupport [
"--enable-tapi-support" "--enable-tapi-support"
"--with-libtapi=${libtapi}" "--with-libtapi=${libtapi}"
]; ];
postPatch = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin '' postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace cctools/Makefile.am --replace libobjc2 "" substituteInPlace cctools/Makefile.am --replace libobjc2 ""
'' + '' '' + ''
sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp
@ -100,7 +100,7 @@ stdenv.mkDerivation {
broken = !stdenv.targetPlatform.isDarwin; # Only supports darwin targets broken = !stdenv.targetPlatform.isDarwin; # Only supports darwin targets
homepage = "http://www.opensource.apple.com/source/cctools/"; homepage = "http://www.opensource.apple.com/source/cctools/";
description = "MacOS Compiler Tools (cross-platform port)"; description = "MacOS Compiler Tools (cross-platform port)";
license = stdenv.lib.licenses.apsl20; license = lib.licenses.apsl20;
maintainers = with stdenv.lib.maintainers; [ matthewbauer ]; maintainers = with lib.maintainers; [ matthewbauer ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, xcbuildHook }: { lib, stdenv, fetchFromGitHub, xcbuildHook }:
stdenv.mkDerivation stdenv.mkDerivation
{ name = "insert_dylib-2016.08.28"; { name = "insert_dylib-2016.08.28";
@ -14,5 +14,5 @@ stdenv.mkDerivation
mkdir -p $out/bin mkdir -p $out/bin
install -m755 Products/Release/insert_dylib $out/bin install -m755 Products/Release/insert_dylib $out/bin
''; '';
meta.platforms = stdenv.lib.platforms.darwin; meta.platforms = lib.platforms.darwin;
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }: { lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation { stdenv.mkDerivation {
version = "1.0"; version = "1.0";
@ -21,8 +21,8 @@ stdenv.mkDerivation {
meta = { meta = {
homepage = "https://github.com/jlhonora/lsusb"; homepage = "https://github.com/jlhonora/lsusb";
description = "lsusb command for Mac OS X"; description = "lsusb command for Mac OS X";
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
license = stdenv.lib.licenses.mit; license = lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.varunpatro ]; maintainers = [ lib.maintainers.varunpatro ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, opencflite, clang, libcxx }: { lib, stdenv, fetchgit, opencflite, clang, libcxx }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "maloader-0git"; name = "maloader-0git";
@ -31,8 +31,8 @@ stdenv.mkDerivation {
meta = { meta = {
description = "Mach-O loader for Linux"; description = "Mach-O loader for Linux";
homepage = "https://github.com/shinh/maloader"; homepage = "https://github.com/shinh/maloader";
license = stdenv.lib.licenses.bsd2; license = lib.licenses.bsd2;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
broken = true; # 2018-09-08, no succesful build since 2017-08-21 broken = true; # 2018-09-08, no succesful build since 2017-08-21
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, icu, libuuid, tzdata }: { lib, stdenv, fetchurl, icu, libuuid, tzdata }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "opencflite"; pname = "opencflite";
@ -16,6 +16,6 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Cross platform port of the macOS CoreFoundation"; description = "Cross platform port of the macOS CoreFoundation";
homepage = "https://sourceforge.net/projects/opencflite/"; homepage = "https://sourceforge.net/projects/opencflite/";
license = stdenv.lib.licenses.apsl20; license = lib.licenses.apsl20;
}; };
} }

View File

@ -1,6 +1,6 @@
{ stdenv, writeScriptBin, runtimeShell }: { lib, stdenv, writeScriptBin, runtimeShell }:
let fake = name: stdenv.lib.overrideDerivation (writeScriptBin name '' let fake = name: lib.overrideDerivation (writeScriptBin name ''
#!${runtimeShell} #!${runtimeShell}
echo >&2 "Faking call to ${name} with arguments:" echo >&2 "Faking call to ${name} with arguments:"
echo >&2 "$@" echo >&2 "$@"

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fetchurl, ninja, python3, curl, libxml2, objc4, ICU }: { lib, stdenv, fetchFromGitHub, fetchurl, ninja, python3, curl, libxml2, objc4, ICU }:
let let
# 10.12 adds a new sysdir.h that our version of CF in the main derivation depends on, but # 10.12 adds a new sysdir.h that our version of CF in the main derivation depends on, but
@ -74,7 +74,7 @@ stdenv.mkDerivation {
# Based on testing this issue seems to only occur with clang_7, so # Based on testing this issue seems to only occur with clang_7, so
# please remove this when updating the default llvm versions to 8 or # please remove this when updating the default llvm versions to 8 or
# later. # later.
buildPhase = stdenv.lib.optionalString true '' buildPhase = lib.optionalString true ''
for i in {1..512}; do for i in {1..512}; do
if ninja -j $NIX_BUILD_CORES; then if ninja -j $NIX_BUILD_CORES; then
break break

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, perl, AppKit, Cocoa, ScriptingBridge }: { lib, stdenv, fetchFromGitHub, perl, AppKit, Cocoa, ScriptingBridge }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.9.2"; version = "0.9.2";
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/ali-rantakari/trash"; homepage = "https://github.com/ali-rantakari/trash";
description = "Small command-line program for OS X that moves files or description = "Small command-line program for OS X that moves files or
folders to the trash."; folders to the trash.";
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
license = stdenv.lib.licenses.mit; license = lib.licenses.mit;
}; };
} }

View File

@ -1,4 +1,4 @@
{stdenv, darwin}: {lib, stdenv, darwin}:
/* /*
* This is needed to build GCC on Darwin. * This is needed to build GCC on Darwin.
@ -19,5 +19,5 @@ stdenv.mkDerivation {
ln -sf ${darwin.CF}/Library/Frameworks/CoreFoundation.framework/Headers/* CoreFoundation ln -sf ${darwin.CF}/Library/Frameworks/CoreFoundation.framework/Headers/* CoreFoundation
''; '';
meta.platforms = stdenv.lib.platforms.darwin; meta.platforms = lib.platforms.darwin;
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }: { lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.1.0"; version = "0.1.0";
@ -19,8 +19,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = "https://github.com/rauchg/wifi-password"; homepage = "https://github.com/rauchg/wifi-password";
description = "Get the password of the wifi you're on"; description = "Get the password of the wifi you're on";
platforms = stdenv.lib.platforms.darwin; platforms = lib.platforms.darwin;
license = stdenv.lib.licenses.mit; license = lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.nikitavoloboev ]; maintainers = [ lib.maintainers.nikitavoloboev ];
}; };
} }

View File

@ -37,9 +37,9 @@ rec {
bintools = binutils-unwrapped; bintools = binutils-unwrapped;
extraBuildCommands = '' extraBuildCommands = ''
echo "-arch ${iosPlatformArch targetPlatform}" >> $out/nix-support/libc-ldflags echo "-arch ${iosPlatformArch targetPlatform}" >> $out/nix-support/libc-ldflags
'' + stdenv.lib.optionalString (sdk.platform == "iPhoneSimulator") '' '' + lib.optionalString (sdk.platform == "iPhoneSimulator") ''
echo "-platform_version ios-sim ${minSdkVersion} ${sdk.version}" >> $out/nix-support/libc-ldflags echo "-platform_version ios-sim ${minSdkVersion} ${sdk.version}" >> $out/nix-support/libc-ldflags
'' + stdenv.lib.optionalString (sdk.platform == "iPhoneOS") '' '' + lib.optionalString (sdk.platform == "iPhoneOS") ''
echo "-platform_version ios ${minSdkVersion} ${sdk.version}" >> $out/nix-support/libc-ldflags echo "-platform_version ios ${minSdkVersion} ${sdk.version}" >> $out/nix-support/libc-ldflags
''; '';
}; };
@ -54,9 +54,9 @@ rec {
mv cc-cflags.tmp $out/nix-support/cc-cflags mv cc-cflags.tmp $out/nix-support/cc-cflags
echo "-target ${targetPlatform.config} -arch ${iosPlatformArch targetPlatform}" >> $out/nix-support/cc-cflags echo "-target ${targetPlatform.config} -arch ${iosPlatformArch targetPlatform}" >> $out/nix-support/cc-cflags
echo "-isystem ${sdk}/usr/include${lib.optionalString (lib.versionAtLeast "10" sdk.version) " -isystem ${sdk}/usr/include/c++/4.2.1/ -stdlib=libstdc++"}" >> $out/nix-support/cc-cflags echo "-isystem ${sdk}/usr/include${lib.optionalString (lib.versionAtLeast "10" sdk.version) " -isystem ${sdk}/usr/include/c++/4.2.1/ -stdlib=libstdc++"}" >> $out/nix-support/cc-cflags
'' + stdenv.lib.optionalString (sdk.platform == "iPhoneSimulator") '' '' + lib.optionalString (sdk.platform == "iPhoneSimulator") ''
echo "-mios-simulator-version-min=${minSdkVersion}" >> $out/nix-support/cc-cflags echo "-mios-simulator-version-min=${minSdkVersion}" >> $out/nix-support/cc-cflags
'' + stdenv.lib.optionalString (sdk.platform == "iPhoneOS") '' '' + lib.optionalString (sdk.platform == "iPhoneOS") ''
echo "-miphoneos-version-min=${minSdkVersion}" >> $out/nix-support/cc-cflags echo "-miphoneos-version-min=${minSdkVersion}" >> $out/nix-support/cc-cflags
''; '';
}) // { }) // {

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
battery and thermal information. battery and thermal information.
''; '';
homepage = "https://sourceforge.net/projects/acpiclient/"; homepage = "https://sourceforge.net/projects/acpiclient/";
license = stdenv.lib.licenses.gpl2Plus; license = lib.licenses.gpl2Plus;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = [ ]; maintainers = [ ];
}; };

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, fetchpatch}: {lib, stdenv, fetchurl, fetchpatch}:
let let
acpitool-patch-051-4 = params: fetchpatch rec { acpitool-patch-051-4 = params: fetchpatch rec {
@ -44,8 +44,8 @@ in stdenv.mkDerivation rec {
meta = { meta = {
description = "A small, convenient command-line ACPI client with a lot of features"; description = "A small, convenient command-line ACPI client with a lot of features";
homepage = "https://sourceforge.net/projects/acpitool/"; homepage = "https://sourceforge.net/projects/acpitool/";
license = stdenv.lib.licenses.gpl2Plus; license = lib.licenses.gpl2Plus;
maintainers = [ stdenv.lib.maintainers.guibert ]; maintainers = [ lib.maintainers.guibert ];
platforms = stdenv.lib.platforms.unix; platforms = lib.platforms.unix;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, autoreconfHook, fuse }: { lib, stdenv, fetchurl, pkgconfig, autoreconfHook, fuse }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "afuse-0.4.1"; name = "afuse-0.4.1";
@ -14,8 +14,8 @@ stdenv.mkDerivation {
meta = { meta = {
description = "Automounter in userspace"; description = "Automounter in userspace";
homepage = "https://github.com/pcarrier/afuse"; homepage = "https://github.com/pcarrier/afuse";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
maintainers = [ stdenv.lib.maintainers.marcweber ]; maintainers = [ lib.maintainers.marcweber ];
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, buildPackages, autoreconfHook, fetchurl, fetchpatch }: { lib, stdenv, buildPackages, autoreconfHook, fetchurl, fetchpatch }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "alsa-firmware-1.2.1"; name = "alsa-firmware-1.2.1";
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = "http://www.alsa-project.org/"; homepage = "http://www.alsa-project.org/";
description = "Soundcard firmwares from the alsa project"; description = "Soundcard firmwares from the alsa project";
license = stdenv.lib.licenses.gpl2Plus; license = lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
installFlags = [ "ASOUND_STATE_DIR=$(TMPDIR)/dummy" ]; installFlags = [ "ASOUND_STATE_DIR=$(TMPDIR)/dummy" ];
postFixup = '' postFixup = ''
wrapProgram $out/bin/alsa-info.sh --prefix PATH : "${stdenv.lib.makeBinPath [ which pciutils ]}" wrapProgram $out/bin/alsa-info.sh --prefix PATH : "${lib.makeBinPath [ which pciutils ]}"
''; '';
meta = with lib; { meta = with lib; {

View File

@ -7,7 +7,7 @@
assert (!libsOnly) -> kernel != null; assert (!libsOnly) -> kernel != null;
with stdenv.lib; with lib;
let let

View File

@ -115,7 +115,7 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
wrapProgram $out/bin/anbox \ wrapProgram $out/bin/anbox \
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [libGL libglvnd]} \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [libGL libglvnd]} \
--prefix PATH : ${git}/bin --prefix PATH : ${git}/bin
mkdir -p $out/share/dbus-1/services mkdir -p $out/share/dbus-1/services

View File

@ -17,7 +17,7 @@ let
apparmor-patchver = "6"; apparmor-patchver = "6";
apparmor-version = apparmor-series + "." + apparmor-patchver; apparmor-version = apparmor-series + "." + apparmor-patchver;
apparmor-meta = component: with stdenv.lib; { apparmor-meta = component: with lib; {
homepage = "https://apparmor.net/"; homepage = "https://apparmor.net/";
description = "A mandatory access control system - ${component}"; description = "A mandatory access control system - ${component}";
license = licenses.gpl2; license = licenses.gpl2;
@ -39,7 +39,7 @@ let
substituteInPlace ./common/Make.rules --replace "/usr/share/man" "share/man" substituteInPlace ./common/Make.rules --replace "/usr/share/man" "share/man"
''; '';
patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [ patches = lib.optionals stdenv.hostPlatform.isMusl [
(fetchpatch { (fetchpatch {
url = "https://git.alpinelinux.org/aports/plain/testing/apparmor/0003-Added-missing-typedef-definitions-on-parser.patch?id=74b8427cc21f04e32030d047ae92caa618105b53"; url = "https://git.alpinelinux.org/aports/plain/testing/apparmor/0003-Added-missing-typedef-definitions-on-parser.patch?id=74b8427cc21f04e32030d047ae92caa618105b53";
name = "0003-Added-missing-typedef-definitions-on-parser.patch"; name = "0003-Added-missing-typedef-definitions-on-parser.patch";
@ -75,8 +75,8 @@ let
]; ];
buildInputs = [] buildInputs = []
++ stdenv.lib.optional withPerl perl ++ lib.optional withPerl perl
++ stdenv.lib.optional withPython python; ++ lib.optional withPython python;
# required to build apparmor-parser # required to build apparmor-parser
dontDisableStatic = true; dontDisableStatic = true;
@ -84,21 +84,21 @@ let
prePatch = prePatchCommon + '' prePatch = prePatchCommon + ''
substituteInPlace ./libraries/libapparmor/swig/perl/Makefile.am --replace install_vendor install_site substituteInPlace ./libraries/libapparmor/swig/perl/Makefile.am --replace install_vendor install_site
substituteInPlace ./libraries/libapparmor/swig/perl/Makefile.in --replace install_vendor install_site substituteInPlace ./libraries/libapparmor/swig/perl/Makefile.in --replace install_vendor install_site
substituteInPlace ./libraries/libapparmor/src/Makefile.am --replace "/usr/include/netinet/in.h" "${stdenv.lib.getDev stdenv.cc.libc}/include/netinet/in.h" substituteInPlace ./libraries/libapparmor/src/Makefile.am --replace "/usr/include/netinet/in.h" "${lib.getDev stdenv.cc.libc}/include/netinet/in.h"
substituteInPlace ./libraries/libapparmor/src/Makefile.in --replace "/usr/include/netinet/in.h" "${stdenv.lib.getDev stdenv.cc.libc}/include/netinet/in.h" substituteInPlace ./libraries/libapparmor/src/Makefile.in --replace "/usr/include/netinet/in.h" "${lib.getDev stdenv.cc.libc}/include/netinet/in.h"
''; '';
inherit patches; inherit patches;
postPatch = "cd ./libraries/libapparmor"; postPatch = "cd ./libraries/libapparmor";
# https://gitlab.com/apparmor/apparmor/issues/1 # https://gitlab.com/apparmor/apparmor/issues/1
configureFlags = [ configureFlags = [
(stdenv.lib.withFeature withPerl "perl") (lib.withFeature withPerl "perl")
(stdenv.lib.withFeature withPython "python") (lib.withFeature withPython "python")
]; ];
outputs = [ "out" ] ++ stdenv.lib.optional withPython "python"; outputs = [ "out" ] ++ lib.optional withPython "python";
postInstall = stdenv.lib.optionalString withPython '' postInstall = lib.optionalString withPython ''
mkdir -p $python/lib mkdir -p $python/lib
mv $out/lib/python* $python/lib/ mv $out/lib/python* $python/lib/
''; '';

View File

@ -9,7 +9,7 @@
assert (!libsOnly) -> kernel != null; assert (!libsOnly) -> kernel != null;
with stdenv.lib; with lib;
# This derivation requires a maximum of gcc49, Linux kernel 4.1 and xorg.xserver 1.17 # This derivation requires a maximum of gcc49, Linux kernel 4.1 and xorg.xserver 1.17
# and will not build or run using versions newer # and will not build or run using versions newer

View File

@ -1,5 +1,5 @@
{ {
stdenv, buildPackages, fetchurl, fetchpatch, lib, stdenv, buildPackages, fetchurl, fetchpatch,
runCommand, runCommand,
autoconf, automake, libtool, autoconf, automake, libtool,
enablePython ? false, python ? null, enablePython ? false, python ? null,
@ -18,9 +18,9 @@ stdenv.mkDerivation rec {
outputs = [ "bin" "dev" "out" "man" ]; outputs = [ "bin" "dev" "out" "man" ];
depsBuildBuild = [ buildPackages.stdenv.cc ]; depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = stdenv.lib.optionals stdenv.hostPlatform.isMusl nativeBuildInputs = lib.optionals stdenv.hostPlatform.isMusl
[ autoconf automake libtool ]; [ autoconf automake libtool ];
buildInputs = stdenv.lib.optional enablePython python; buildInputs = lib.optional enablePython python;
configureFlags = [ configureFlags = [
# z/OS plugin is not useful on Linux, # z/OS plugin is not useful on Linux,
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
# TODO: Remove the musl patches when # TODO: Remove the musl patches when
# https://github.com/linux-audit/audit-userspace/pull/25 # https://github.com/linux-audit/audit-userspace/pull/25
# is available with the next release. # is available with the next release.
patches = stdenv.lib.optional stdenv.hostPlatform.isMusl [ patches = lib.optional stdenv.hostPlatform.isMusl [
( (
let patch = fetchpatch { let patch = fetchpatch {
url = "https://github.com/linux-audit/audit-userspace/commit/d579a08bb1cde71f939c13ac6b2261052ae9f77e.patch"; url = "https://github.com/linux-audit/audit-userspace/commit/d579a08bb1cde71f939c13ac6b2261052ae9f77e.patch";
@ -59,8 +59,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Audit Library"; description = "Audit Library";
homepage = "https://people.redhat.com/sgrubb/audit/"; homepage = "https://people.redhat.com/sgrubb/audit/";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ ]; maintainers = with lib.maintainers; [ ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, flex, bison, linuxHeaders, libtirpc, mount, umount, nfs-utils, e2fsprogs { lib, stdenv, fetchurl, flex, bison, linuxHeaders, libtirpc, mount, umount, nfs-utils, e2fsprogs
, libxml2, kerberos, kmod, openldap, sssd, cyrus_sasl, openssl, rpcsvc-proto }: , libxml2, kerberos, kmod, openldap, sssd, cyrus_sasl, openssl, rpcsvc-proto }:
let let
@ -44,8 +44,8 @@ in stdenv.mkDerivation {
meta = { meta = {
description = "Kernel-based automounter"; description = "Kernel-based automounter";
homepage = "https://www.kernel.org/pub/linux/daemons/autofs/"; homepage = "https://www.kernel.org/pub/linux/daemons/autofs/";
license = stdenv.lib.licenses.gpl2Plus; license = lib.licenses.gpl2Plus;
executables = [ "automount" ]; executables = [ "automount" ];
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, gpsd, libcap, libnl }: { lib, stdenv, fetchurl, pkgconfig, gpsd, libcap, libnl }:
let cfg = import ./version.nix; in let cfg = import ./version.nix; in
@ -21,8 +21,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki"; homepage = "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki";
description = "B.A.T.M.A.N. routing protocol in a linux kernel module for layer 2, information distribution tool"; description = "B.A.T.M.A.N. routing protocol in a linux kernel module for layer 2, information distribution tool";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ fpletz ]; maintainers = with lib.maintainers; [ fpletz ];
platforms = with stdenv.lib.platforms; linux; platforms = with lib.platforms; linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgconfig, libnl }: { lib, stdenv, fetchurl, pkgconfig, libnl }:
let cfg = import ./version.nix; in let cfg = import ./version.nix; in
@ -21,8 +21,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki"; homepage = "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki";
description = "B.A.T.M.A.N. routing protocol in a linux kernel module for layer 2, control tool"; description = "B.A.T.M.A.N. routing protocol in a linux kernel module for layer 2, control tool";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ fpletz ]; maintainers = with lib.maintainers; [ fpletz ];
platforms = with stdenv.lib.platforms; linux; platforms = with lib.platforms; linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, kernel }: { lib, stdenv, fetchurl, kernel }:
let cfg = import ./version.nix; in let cfg = import ./version.nix; in
@ -24,8 +24,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki"; homepage = "https://www.open-mesh.org/projects/batman-adv/wiki/Wiki";
description = "B.A.T.M.A.N. routing protocol in a linux kernel module for layer 2"; description = "B.A.T.M.A.N. routing protocol in a linux kernel module for layer 2";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ fpletz ]; maintainers = with lib.maintainers; [ fpletz ];
platforms = with stdenv.lib.platforms; linux; platforms = with lib.platforms; linux;
}; };
} }

View File

@ -31,7 +31,7 @@ python.pkgs.buildPythonApplication rec {
propagatedBuildInputs = [ python.pkgs.netaddr ]; propagatedBuildInputs = [ python.pkgs.netaddr ];
nativeBuildInputs = [ makeWrapper cmake flex bison ] nativeBuildInputs = [ makeWrapper cmake flex bison ]
# libelf is incompatible with elfutils-libelf # libelf is incompatible with elfutils-libelf
++ stdenv.lib.filter (x: x != libelf) kernel.moduleBuildDependencies; ++ lib.filter (x: x != libelf) kernel.moduleBuildDependencies;
cmakeFlags = [ cmakeFlags = [
"-DBCC_KERNEL_MODULES_DIR=${kernel.dev}/lib/modules" "-DBCC_KERNEL_MODULES_DIR=${kernel.dev}/lib/modules"

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, libaio }: { lib, stdenv, fetchurl, libaio }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "blktrace-1.2.0"; name = "blktrace-1.2.0";
@ -18,7 +18,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "Block layer IO tracing mechanism"; description = "Block layer IO tracing mechanism";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
meson meson
ninja ninja
pkgconfig pkgconfig
] ++ stdenv.lib.optional (!doCheck) python3; ] ++ lib.optional (!doCheck) python3;
buildInputs = [ buildInputs = [
glib glib

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkgconfig flex bison ] nativeBuildInputs = [ cmake pkgconfig flex bison ]
# libelf is incompatible with elfutils-libelf # libelf is incompatible with elfutils-libelf
++ stdenv.lib.filter (x: x != libelf) kernel.moduleBuildDependencies; ++ lib.filter (x: x != libelf) kernel.moduleBuildDependencies;
# patch the source, *then* substitute on @NIX_KERNEL_SRC@ in the result. we could # patch the source, *then* substitute on @NIX_KERNEL_SRC@ in the result. we could
# also in theory make this an environment variable around bpftrace, but this works # also in theory make this an environment variable around bpftrace, but this works

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, autoreconfHook }: { lib, stdenv, fetchurl, autoreconfHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "bridge-utils-1.5"; name = "bridge-utils-1.5";
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "https://sourceforge.net/projects/bridge/"; description = "https://sourceforge.net/projects/bridge/";
homepage = "https://wiki.linuxfoundation.org/networking/bridge"; homepage = "https://wiki.linuxfoundation.org/networking/bridge";
license = stdenv.lib.licenses.gpl2Plus; license = lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, kernel }: { lib, stdenv, fetchurl, kernel }:
let let
version = "6.30.223.271"; version = "6.30.223.271";
@ -7,8 +7,8 @@ let
x86_64-linux = "1gj485qqr190idilacpxwgqyw21il03zph2rddizgj7fbd6pfyaz"; x86_64-linux = "1gj485qqr190idilacpxwgqyw21il03zph2rddizgj7fbd6pfyaz";
}; };
arch = stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "_64"; arch = lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") "_64";
tarballVersion = stdenv.lib.replaceStrings ["."] ["_"] version; tarballVersion = lib.replaceStrings ["."] ["_"] version;
tarball = "hybrid-v35${arch}-nodebug-pcoem-${tarballVersion}.tar.gz"; tarball = "hybrid-v35${arch}-nodebug-pcoem-${tarballVersion}.tar.gz";
in in
stdenv.mkDerivation { stdenv.mkDerivation {
@ -62,8 +62,8 @@ stdenv.mkDerivation {
meta = { meta = {
description = "Kernel module driver for some Broadcom's wireless cards"; description = "Kernel module driver for some Broadcom's wireless cards";
homepage = "http://www.broadcom.com/support/802.11/linux_sta.php"; homepage = "http://www.broadcom.com/support/802.11/linux_sta.php";
license = stdenv.lib.licenses.unfreeRedistributable; license = lib.licenses.unfreeRedistributable;
maintainers = with stdenv.lib.maintainers; [ phreedom ]; maintainers = with lib.maintainers; [ phreedom ];
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
patches = [ patches = [
./busybox-in-store.patch ./busybox-in-store.patch
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./clang-cross.patch; ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./clang-cross.patch;
postPatch = "patchShebangs ."; postPatch = "patchShebangs .";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, bison, flex, libsepol }: { lib, stdenv, fetchurl, bison, flex, libsepol }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "checkpolicy"; pname = "checkpolicy";
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
makeFlags = [ makeFlags = [
"PREFIX=$(out)" "PREFIX=$(out)"
"LIBSEPOLA=${stdenv.lib.getLib libsepol}/lib/libsepol.a" "LIBSEPOLA=${lib.getLib libsepol}/lib/libsepol.a"
]; ];
meta = removeAttrs libsepol.meta ["outputsToInstall"] // { meta = removeAttrs libsepol.meta ["outputsToInstall"] // {

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
installPhase = let installPhase = let
path = stdenv.lib.makeBinPath [ path = lib.makeBinPath [
findutils file binutils-unwrapped sysctl openssl findutils file binutils-unwrapped sysctl openssl
]; ];
in '' in ''

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ kerberos keyutils pam talloc ]; buildInputs = [ kerberos keyutils pam talloc ];
configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
# AC_FUNC_MALLOC is broken on cross builds. # AC_FUNC_MALLOC is broken on cross builds.
"ac_cv_func_malloc_0_nonnull=yes" "ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes" "ac_cv_func_realloc_0_nonnull=yes"

View File

@ -64,7 +64,7 @@ assert weatherMetarSupport -> curlSupport;
assert weatherXoapSupport -> curlSupport && libxml2 != null; assert weatherXoapSupport -> curlSupport && libxml2 != null;
assert journalSupport -> systemd != null; assert journalSupport -> systemd != null;
with stdenv.lib; with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "conky"; pname = "conky";

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, autoconf, automake, ncurses}: {lib, stdenv, fetchurl, autoconf, automake, ncurses}:
let let
s = # Generated upstream information s = # Generated upstream information
rec { rec {
@ -30,8 +30,8 @@ stdenv.mkDerivation {
meta = { meta = {
inherit (s) version; inherit (s) version;
description = "Linux text console viewer"; description = "Linux text console viewer";
license = stdenv.lib.licenses.epl10 ; license = lib.licenses.epl10 ;
maintainers = [stdenv.lib.maintainers.raskin]; maintainers = [lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl }: { lib, stdenv, fetchurl, perl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "cpuid"; pname = "cpuid";
@ -42,9 +42,9 @@ stdenv.mkDerivation rec {
''; '';
platforms = [ "i686-linux" "x86_64-linux" ]; platforms = [ "i686-linux" "x86_64-linux" ];
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
homepage = "http://etallen.com/cpuid.html"; homepage = "http://etallen.com/cpuid.html";
maintainers = with stdenv.lib.maintainers; [ blitz ]; maintainers = with lib.maintainers; [ blitz ];
}; };
} }

View File

@ -20,7 +20,7 @@ stdenv.mkDerivation {
"LD=${stdenv.cc.targetPrefix}cc" "LD=${stdenv.cc.targetPrefix}cc"
]; ];
installFlags = stdenv.lib.mapAttrsToList installFlags = lib.mapAttrsToList
(n: v: "${n}dir=${placeholder "out"}/${v}") { (n: v: "${n}dir=${placeholder "out"}/${v}") {
bin = "bin"; bin = "bin";
sbin = "sbin"; sbin = "sbin";

View File

@ -1,4 +1,4 @@
{ fetchFromGitHub, stdenv, kernel ? false }: { fetchFromGitHub, lib, stdenv, kernel ? false }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "cryptodev-linux-1.11"; pname = "cryptodev-linux-1.11";
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Device that allows access to Linux kernel cryptographic drivers"; description = "Device that allows access to Linux kernel cryptographic drivers";
homepage = "http://cryptodev-linux.org/"; homepage = "http://cryptodev-linux.org/";
license = stdenv.lib.licenses.gpl2Plus; license = lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, lvm2, json_c { lib, stdenv, fetchurl, lvm2, json_c
, openssl, libuuid, pkgconfig, popt }: , openssl, libuuid, pkgconfig, popt }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -39,8 +39,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = "https://gitlab.com/cryptsetup/cryptsetup/"; homepage = "https://gitlab.com/cryptsetup/cryptsetup/";
description = "LUKS for dm-crypt"; description = "LUKS for dm-crypt";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ ]; maintainers = with lib.maintainers; [ ];
platforms = with stdenv.lib.platforms; linux; platforms = with lib.platforms; linux;
}; };
} }

View File

@ -1,6 +1,6 @@
{ stdenvNoCC, dtc, findutils }: { lib, stdenvNoCC, dtc, findutils }:
with stdenvNoCC.lib; { with lib; {
applyOverlays = (base: overlays': stdenvNoCC.mkDerivation { applyOverlays = (base: overlays': stdenvNoCC.mkDerivation {
name = "device-tree-overlays"; name = "device-tree-overlays";
nativeBuildInputs = [ dtc findutils ]; nativeBuildInputs = [ dtc findutils ];

View File

@ -1,4 +1,4 @@
{ stdenvNoCC, raspberrypifw }: { lib, stdenvNoCC, raspberrypifw }:
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation {
name = "raspberrypi-dtbs-${raspberrypifw.version}"; name = "raspberrypi-dtbs-${raspberrypifw.version}";
@ -30,7 +30,7 @@ stdenvNoCC.mkDerivation {
# Compatible overlays that may be used # Compatible overlays that may be used
overlays = "${raspberrypifw}/share/raspberrypi/boot/overlays"; overlays = "${raspberrypifw}/share/raspberrypi/boot/overlays";
}; };
meta = with stdenvNoCC.lib; { meta = with lib; {
inherit (raspberrypifw.meta) homepage license; inherit (raspberrypifw.meta) homepage license;
description = "DTBs for the Raspberry Pi"; description = "DTBs for the Raspberry Pi";
}; };

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub, fetchpatch, kernel }: { lib, stdenv, fetchFromGitHub, fetchpatch, kernel }:
assert stdenv.lib.versionAtLeast kernel.version "3.5"; assert lib.versionAtLeast kernel.version "3.5";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "digimend"; pname = "digimend";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, libX11 }: { lib, stdenv, fetchgit, libX11 }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "disk-indicator-2014-05-19"; name = "disk-indicator-2014-05-19";
@ -34,7 +34,7 @@ stdenv.mkDerivation {
Small program for Linux that will turn your Scroll, Caps or Num Lock LED Small program for Linux that will turn your Scroll, Caps or Num Lock LED
or LED on your ThinkPad laptop into a hard disk activity indicator. or LED on your ThinkPad laptop into a hard disk activity indicator.
''; '';
license = stdenv.lib.licenses.gpl3; license = lib.licenses.gpl3;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, lvm2 }: { lib, stdenv, fetchurl, fetchpatch, lvm2 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dmraid-1.0.0.rc16"; name = "dmraid-1.0.0.rc16";
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
}; };
patches = [ ./hardening-format.patch ] patches = [ ./hardening-format.patch ]
++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ ++ lib.optionals stdenv.hostPlatform.isMusl [
(fetchpatch { (fetchpatch {
url = "https://raw.githubusercontent.com/void-linux/void-packages/fceed4b8e96b3c1da07babf6f67b6ed1588a28b2/srcpkgs/dmraid/patches/006-musl-libc.patch"; url = "https://raw.githubusercontent.com/void-linux/void-packages/fceed4b8e96b3c1da07babf6f67b6ed1588a28b2/srcpkgs/dmraid/patches/006-musl-libc.patch";
sha256 = "1j8xda0fpz8lxjxnqdidy7qb866qrzwpbca56yjdg6vf4x21hx6w"; sha256 = "1j8xda0fpz8lxjxnqdidy7qb866qrzwpbca56yjdg6vf4x21hx6w";
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
postPatch = '' postPatch = ''
sed -i 's/\[\[[^]]*\]\]/[ "''$''${n##*.}" = "so" ]/' */lib/Makefile.in sed -i 's/\[\[[^]]*\]\]/[ "''$''${n##*.}" = "so" ]/' */lib/Makefile.in
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' '' + lib.optionalString stdenv.hostPlatform.isMusl ''
NIX_CFLAGS_COMPILE+=" -D_GNU_SOURCE" NIX_CFLAGS_COMPILE+=" -D_GNU_SOURCE"
''; '';
@ -42,8 +42,8 @@ stdenv.mkDerivation rec {
its volumes. May be needed for rescuing an older system or nuking its volumes. May be needed for rescuing an older system or nuking
the metadata when reformatting. the metadata when reformatting.
''; '';
maintainers = [ stdenv.lib.maintainers.raskin ]; maintainers = [ lib.maintainers.raskin ];
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
license = stdenv.lib.licenses.gpl2Plus; license = lib.licenses.gpl2Plus;
}; };
} }

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, kernel }: { lib, stdenv, fetchurl, kernel }:
assert stdenv.lib.versionOlder kernel.version "4.10"; assert lib.versionOlder kernel.version "4.10";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "e1000e-${version}-${kernel.version}"; name = "e1000e-${version}-${kernel.version}";
@ -32,6 +32,6 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Linux kernel drivers for Intel Ethernet adapters and LOMs (LAN On Motherboard)"; description = "Linux kernel drivers for Intel Ethernet adapters and LOMs (LAN On Motherboard)";
homepage = "http://e1000.sf.net/"; homepage = "http://e1000.sf.net/";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
}; };
} }

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
sha256 = "16iyn51xlrsbshc7p5xl2338yyfzknaqc538sa7mamgccqwgyvvq"; sha256 = "16iyn51xlrsbshc7p5xl2338yyfzknaqc538sa7mamgccqwgyvvq";
}; };
nativeBuildInputs = stdenv.lib.optionals withManpage [ pandoc installShellFiles ]; nativeBuildInputs = lib.optionals withManpage [ pandoc installShellFiles ];
patches = [ ./fix-dbus-path.patch ]; patches = [ ./fix-dbus-path.patch ];
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
install -D earlyoom $out/bin/earlyoom install -D earlyoom $out/bin/earlyoom
'' + stdenv.lib.optionalString withManpage '' '' + lib.optionalString withManpage ''
installManPage earlyoom.1 installManPage earlyoom.1
''; '';

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation {
postInstall = '' postInstall = ''
wrapProgram "$out/sbin/edac-ctl" \ wrapProgram "$out/sbin/edac-ctl" \
--set PATH ${stdenv.lib.makeBinPath [ dmidecode kmod ]} --set PATH ${lib.makeBinPath [ dmidecode kmod ]}
''; '';
meta = with lib; { meta = with lib; {

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, pkgconfig, glib, gperf, util-linux, kmod}: {lib, stdenv, fetchurl, pkgconfig, glib, gperf, util-linux, kmod}:
let let
s = # Generated upstream information s = # Generated upstream information
rec { rec {
@ -50,9 +50,9 @@ stdenv.mkDerivation {
meta = { meta = {
inherit (s) version; inherit (s) version;
description = ''An udev fork by Gentoo''; description = ''An udev fork by Gentoo'';
license = stdenv.lib.licenses.gpl2Plus ; license = lib.licenses.gpl2Plus ;
maintainers = [stdenv.lib.maintainers.raskin]; maintainers = [lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
homepage = ''https://www.gentoo.org/proj/en/eudev/''; homepage = ''https://www.gentoo.org/proj/en/eudev/'';
downloadPage = ''http://dev.gentoo.org/~blueness/eudev/''; downloadPage = ''http://dev.gentoo.org/~blueness/eudev/'';
updateWalker = true; updateWalker = true;

View File

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
makeFlags = [ makeFlags = [
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"ARCH=${stdenv.hostPlatform.platform.kernelArch}" "ARCH=${stdenv.hostPlatform.platform.kernelArch}"
] ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ ] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}" "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
]; ];

View File

@ -1,7 +1,7 @@
{ stdenv, lib, fetchFromGitHub, kernel }: { stdenv, lib, fetchFromGitHub, kernel }:
# facetimehd is not supported for kernels older than 3.19"; # facetimehd is not supported for kernels older than 3.19";
assert stdenv.lib.versionAtLeast kernel.version "3.19"; assert lib.versionAtLeast kernel.version "3.19";
let let
# Note: When updating this revision: # Note: When updating this revision:
@ -14,7 +14,7 @@ let
# e. see if the module loads back (apps using the camera won't # e. see if the module loads back (apps using the camera won't
# recover and will have to be restarted) and the camera # recover and will have to be restarted) and the camera
# still works. # still works.
srcParams = if (stdenv.lib.versionAtLeast kernel.version "4.8") then srcParams = if (lib.versionAtLeast kernel.version "4.8") then
{ # Use mainline branch { # Use mainline branch
version = "unstable-2020-04-16"; version = "unstable-2020-04-16";
rev = "82626d4892eeb9eb704538bf0dc49a00725ff451"; rev = "82626d4892eeb9eb704538bf0dc49a00725ff451";

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, fetchpatch, which, xdg-dbus-proxy, nixosTests}: {lib, stdenv, fetchurl, fetchpatch, which, xdg-dbus-proxy, nixosTests}:
let let
s = # Generated upstream information s = # Generated upstream information
rec { rec {
@ -81,9 +81,9 @@ stdenv.mkDerivation {
meta = { meta = {
inherit (s) version; inherit (s) version;
description = ''Namespace-based sandboxing tool for Linux''; description = ''Namespace-based sandboxing tool for Linux'';
license = stdenv.lib.licenses.gpl2Plus ; license = lib.licenses.gpl2Plus ;
maintainers = [stdenv.lib.maintainers.raskin]; maintainers = [lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
homepage = "https://firejail.wordpress.com/"; homepage = "https://firejail.wordpress.com/";
downloadPage = "https://sourceforge.net/projects/firejail/files/firejail/"; downloadPage = "https://sourceforge.net/projects/firejail/files/firejail/";
}; };

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }: { lib, stdenv, fetchurl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "b43-fwcutter-019"; name = "b43-fwcutter-019";
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Firmware extractor for cards supported by the b43 kernel module"; description = "Firmware extractor for cards supported by the b43 kernel module";
homepage = "http://wireless.kernel.org/en/users/Drivers/b43"; homepage = "http://wireless.kernel.org/en/users/Drivers/b43";
license = stdenv.lib.licenses.free; license = lib.licenses.free;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, b43FirmwareCutter }: { lib, stdenv, fetchurl, b43FirmwareCutter }:
let version = "5.100.138"; in let version = "5.100.138"; in
@ -23,7 +23,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "Firmware for cards supported by the b43 kernel module"; description = "Firmware for cards supported by the b43 kernel module";
homepage = "http://wireless.kernel.org/en/users/Drivers/b43"; homepage = "http://wireless.kernel.org/en/users/Drivers/b43";
license = stdenv.lib.licenses.unfree; license = lib.licenses.unfree;
}; };
} }

View File

@ -19,7 +19,7 @@ stdenvNoCC.mkDerivation rec {
outputHashAlgo = "sha256"; outputHashAlgo = "sha256";
outputHash = "1p7vn2hfwca6w69jhw5zq70w44ji8mdnibm1z959aalax6ndy146"; outputHash = "1p7vn2hfwca6w69jhw5zq70w44ji8mdnibm1z959aalax6ndy146";
meta = with stdenvNoCC.lib; { meta = with lib; {
description = "Binary firmware collection packaged by kernel.org"; description = "Binary firmware collection packaged by kernel.org";
homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"; homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
license = licenses.unfreeRedistributableFirmware; license = licenses.unfreeRedistributableFirmware;

View File

@ -160,7 +160,7 @@ let
pango pango
tpm2-tss tpm2-tss
efivar efivar
] ++ stdenv.lib.optionals haveDell [ ] ++ lib.optionals haveDell [
libsmbios libsmbios
]; ];
@ -187,12 +187,12 @@ let
# Our builder only adds $lib/lib to rpath but some things link # Our builder only adds $lib/lib to rpath but some things link
# against libfwupdplugin which is in $out/lib. # against libfwupdplugin which is in $out/lib.
"-Dc_link_args=-Wl,-rpath,${placeholder "out"}/lib" "-Dc_link_args=-Wl,-rpath,${placeholder "out"}/lib"
] ++ stdenv.lib.optionals (!haveDell) [ ] ++ lib.optionals (!haveDell) [
"-Dplugin_dell=false" "-Dplugin_dell=false"
"-Dplugin_synaptics=false" "-Dplugin_synaptics=false"
] ++ stdenv.lib.optionals (!haveRedfish) [ ] ++ lib.optionals (!haveRedfish) [
"-Dplugin_redfish=false" "-Dplugin_redfish=false"
] ++ stdenv.lib.optionals haveFlashrom [ ] ++ lib.optionals haveFlashrom [
"-Dplugin_flashrom=true" "-Dplugin_flashrom=true"
]; ];
@ -250,12 +250,12 @@ let
efibootmgr efibootmgr
bubblewrap bubblewrap
tpm2-tools tpm2-tools
] ++ stdenv.lib.optional haveFlashrom flashrom; ] ++ lib.optional haveFlashrom flashrom;
in '' in ''
gappsWrapperArgs+=( gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share" --prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
# See programs reached with fu_common_find_program_in_path in source # See programs reached with fu_common_find_program_in_path in source
--prefix PATH : "${stdenv.lib.makeBinPath binPath}" --prefix PATH : "${lib.makeBinPath binPath}"
) )
''; '';
@ -291,7 +291,7 @@ let
"pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata" "pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata"
"pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service" "pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service"
"pki/fwupd-metadata/LVFS-CA.pem" "pki/fwupd-metadata/LVFS-CA.pem"
] ++ stdenv.lib.optionals haveDell [ ] ++ lib.optionals haveDell [
"fwupd/remotes.d/dell-esrt.conf" "fwupd/remotes.d/dell-esrt.conf"
]; ];
@ -302,7 +302,7 @@ let
]; ];
tests = let tests = let
listToPy = list: "[${stdenv.lib.concatMapStringsSep ", " (f: "'${f}'") list}]"; listToPy = list: "[${lib.concatMapStringsSep ", " (f: "'${f}'") list}]";
in { in {
installedTests = nixosTests.installed-tests.fwupd; installedTests = nixosTests.installed-tests.fwupd;

View File

@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkgconfig }: { lib, stdenv, fetchFromGitHub, cmake, pkgconfig }:
let let
inherit (stdenv.lib) optionals; inherit (lib) optionals;
in in
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "raspberrypi-armstubs"; pname = "raspberrypi-armstubs";

View File

@ -1,4 +1,4 @@
{ stdenvNoCC, fetchFromGitHub }: { lib, stdenvNoCC, fetchFromGitHub }:
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
# NOTE: this should be updated with linux_rpi # NOTE: this should be updated with linux_rpi
@ -21,7 +21,7 @@ stdenvNoCC.mkDerivation rec {
dontBuild = true; dontBuild = true;
dontFixup = true; dontFixup = true;
meta = with stdenvNoCC.lib; { meta = with lib; {
description = "Firmware for the Raspberry Pi board"; description = "Firmware for the Raspberry Pi board";
homepage = "https://github.com/raspberrypi/firmware"; homepage = "https://github.com/raspberrypi/firmware";
license = licenses.unfreeRedistributableFirmware; # See https://github.com/raspberrypi/firmware/blob/master/boot/LICENCE.broadcom license = licenses.unfreeRedistributableFirmware; # See https://github.com/raspberrypi/firmware/blob/master/boot/LICENCE.broadcom

View File

@ -1,5 +1,5 @@
{ lib, stdenv, fetchFromGitHub }: { lib, stdenv, fetchFromGitHub }:
with stdenv.lib; with lib;
stdenv.mkDerivation { stdenv.mkDerivation {
name = "rtl8192su-unstable-2016-10-05"; name = "rtl8192su-unstable-2016-10-05";

View File

@ -1,5 +1,5 @@
{ lib, stdenv, linuxPackages }: { lib, stdenv, linuxPackages }:
with stdenv.lib; with lib;
stdenv.mkDerivation { stdenv.mkDerivation {
name = "rtl8723bs-firmware-${linuxPackages.rtl8723bs.version}"; name = "rtl8723bs-firmware-${linuxPackages.rtl8723bs.version}";
inherit (linuxPackages.rtl8723bs) src; inherit (linuxPackages.rtl8723bs) src;

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub }: { lib, stdenv, fetchFromGitHub }:
with stdenv.lib; with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "sof-firmware"; pname = "sof-firmware";
version = "1.6"; version = "1.6";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchzip }: { lib, stdenv, fetchzip }:
let let
pname = "zd1211-firmware"; pname = "zd1211-firmware";
@ -19,6 +19,6 @@ in fetchzip rec {
description = "Firmware for the ZyDAS ZD1211(b) 802.11a/b/g USB WLAN chip"; description = "Firmware for the ZyDAS ZD1211(b) 802.11a/b/g USB WLAN chip";
homepage = "https://sourceforge.net/projects/zd1211/"; homepage = "https://sourceforge.net/projects/zd1211/";
license = "GPL"; license = "GPL";
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl}: {lib, stdenv, fetchurl}:
let let
s = # Generated upstream information s = # Generated upstream information
rec { rec {
@ -29,8 +29,8 @@ stdenv.mkDerivation {
meta = { meta = {
inherit (s) version; inherit (s) version;
description = ''Tool to detach from controlling TTY and attach to another''; description = ''Tool to detach from controlling TTY and attach to another'';
license = stdenv.lib.licenses.gpl2 ; license = lib.licenses.gpl2 ;
maintainers = [stdenv.lib.maintainers.raskin]; maintainers = [lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, libv4l, gd }: { lib, stdenv, fetchurl, libv4l, gd }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "fswebcam-20200725"; name = "fswebcam-20200725";
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Neat and simple webcam app"; description = "Neat and simple webcam app";
homepage = "http://www.sanslogic.co.uk/fswebcam"; homepage = "http://www.sanslogic.co.uk/fswebcam";
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
}; };
} }

View File

@ -8,7 +8,7 @@
}: }:
let let
isFuse3 = stdenv.lib.hasPrefix "3" version; isFuse3 = lib.hasPrefix "3" version;
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "fuse"; pname = "fuse";
inherit version; inherit version;
@ -23,7 +23,7 @@ in stdenv.mkDerivation rec {
preAutoreconf = "touch config.rpath"; preAutoreconf = "touch config.rpath";
patches = patches =
stdenv.lib.optional lib.optional
(!isFuse3 && stdenv.isAarch64) (!isFuse3 && stdenv.isAarch64)
(fetchpatch { (fetchpatch {
url = "https://github.com/libfuse/libfuse/commit/914871b20a901e3e1e981c92bc42b1c93b7ab81b.patch"; url = "https://github.com/libfuse/libfuse/commit/914871b20a901e3e1e981c92bc42b1c93b7ab81b.patch";
@ -37,9 +37,9 @@ in stdenv.mkDerivation rec {
then [ meson ninja pkg-config ] then [ meson ninja pkg-config ]
else [ autoreconfHook gettext ]; else [ autoreconfHook gettext ];
outputs = [ "out" ] ++ stdenv.lib.optional isFuse3 "common"; outputs = [ "out" ] ++ lib.optional isFuse3 "common";
mesonFlags = stdenv.lib.optionals isFuse3 [ mesonFlags = lib.optionals isFuse3 [
"-Dudevrulesdir=/udev/rules.d" "-Dudevrulesdir=/udev/rules.d"
"-Duseroot=false" "-Duseroot=false"
]; ];

View File

@ -1,4 +1,4 @@
{stdenv, fetchFromGitHub, linuxHeaders}: {lib, stdenv, fetchFromGitHub, linuxHeaders}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.4"; version = "1.4";
@ -26,8 +26,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = ''Uinput driver for Android GfxTablet tablet-as-input-device app''; description = ''Uinput driver for Android GfxTablet tablet-as-input-device app'';
license = stdenv.lib.licenses.mit ; license = lib.licenses.mit ;
maintainers = [stdenv.lib.maintainers.raskin]; maintainers = [lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -39,8 +39,8 @@ stdenv.mkDerivation rec {
intltool intltool
pkgconfig pkgconfig
] ]
++ stdenv.lib.optionals (useGtk) [ wrapGAppsHook ] ++ lib.optionals (useGtk) [ wrapGAppsHook ]
++ stdenv.lib.optionals (useQt) [ wrapQtAppsHook ] ++ lib.optionals (useQt) [ wrapQtAppsHook ]
; ;
buildInputs = [ buildInputs = [
@ -55,17 +55,17 @@ stdenv.mkDerivation rec {
libpng libpng
sfml sfml
] ]
++ stdenv.lib.optionals (pulseaudioSupport) [ libpulseaudio ] ++ lib.optionals (pulseaudioSupport) [ libpulseaudio ]
++ stdenv.lib.optionals (useGtk) [ gtk3 ] ++ lib.optionals (useGtk) [ gtk3 ]
++ stdenv.lib.optionals (useQt) [ ++ lib.optionals (useQt) [
qtbase qtbase
] ]
; ;
configureFlags = [ configureFlags = [
"--enable-sfml" "--enable-sfml"
] ]
++ stdenv.lib.optionals (useGtk) [ "--enable-gtk3" ] ++ lib.optionals (useGtk) [ "--enable-gtk3" ]
++ stdenv.lib.optionals (useQt) [ "--enable-qt5" ] ++ lib.optionals (useQt) [ "--enable-qt5" ]
; ;
meta = with lib; { meta = with lib; {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }: { lib, stdenv, fetchurl }:
let version = "20141203"; in let version = "20141203"; in
stdenv.mkDerivation { stdenv.mkDerivation {
@ -11,7 +11,7 @@ stdenv.mkDerivation {
postInstall = builtins.readFile ./postInstall.sh; postInstall = builtins.readFile ./postInstall.sh;
meta = with stdenv.lib; meta = with lib;
{ description = "Hard Drive Active Protection System Daemon"; { description = "Hard Drive Active Protection System Daemon";
homepage = "http://hdaps.sf.net/"; homepage = "http://hdaps.sf.net/";
license = licenses.gpl2; license = licenses.gpl2;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, gawk }: { lib, stdenv, fetchurl, gawk }:
let version = "2.0"; let version = "2.0";
in in
@ -35,12 +35,12 @@ in
description = "The `hibernate' script for swsusp and Tux-on-Ice"; description = "The `hibernate' script for swsusp and Tux-on-Ice";
longDescription = '' longDescription = ''
This package provides the `hibernate' script, a command-line utility This package provides the `hibernate' script, a command-line utility
that saves the computer's state to disk and switches it off, turning that saves the computer's state to disk and switches it off, turning
it into "hibernation". It works both with Linux swsusp and Tux-on-Ice. it into "hibernation". It works both with Linux swsusp and Tux-on-Ice.
''; '';
license = stdenv.lib.licenses.gpl2Plus; license = lib.licenses.gpl2Plus;
homepage = "http://www.tuxonice.net/"; homepage = "http://www.tuxonice.net/";
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -75,7 +75,7 @@ stdenv.mkDerivation rec {
CONFIG_HS20=y CONFIG_HS20=y
CONFIG_ACS=y CONFIG_ACS=y
CONFIG_GETRANDOM=y CONFIG_GETRANDOM=y
'' + stdenv.lib.optionalString (sqlite != null) '' '' + lib.optionalString (sqlite != null) ''
CONFIG_SQLITE=y CONFIG_SQLITE=y
''; '';

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }: { lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "hwdata"; pname = "hwdata";
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = "https://github.com/vcrhonek/hwdata"; homepage = "https://github.com/vcrhonek/hwdata";
description = "Hardware Database, including Monitors, pci.ids, usb.ids, and video cards"; description = "Hardware Database, including Monitors, pci.ids, usb.ids, and video cards";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pciutils }: { lib, stdenv, fetchurl, pciutils }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "i810switch-0.6.5"; name = "i810switch-0.6.5";
@ -20,7 +20,7 @@ stdenv.mkDerivation {
meta = { meta = {
description = "A utility for switching between the LCD and external VGA display on Intel graphics cards"; description = "A utility for switching between the LCD and external VGA display on Intel graphics cards";
homepage = "http://www16.plala.or.jp/mano-a-mano/i810switch.html"; homepage = "http://www16.plala.or.jp/mano-a-mano/i810switch.html";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }: { lib, stdenv, fetchurl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "ifenslave"; pname = "ifenslave";
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Utility for enslaving networking interfaces under a bond"; description = "Utility for enslaving networking interfaces under a bond";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, autoreconfHook, pkgconfig, openssl, attr, keyutils, asciidoc, libxslt, docbook_xsl }: { lib, stdenv, fetchgit, autoreconfHook, pkgconfig, openssl, attr, keyutils, asciidoc, libxslt, docbook_xsl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "ima-evm-utils"; pname = "ima-evm-utils";
@ -20,8 +20,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "evmctl utility to manage digital signatures of the Linux kernel integrity subsystem (IMA/EVM)"; description = "evmctl utility to manage digital signatures of the Linux kernel integrity subsystem (IMA/EVM)";
homepage = "https://sourceforge.net/projects/linux-ima/"; homepage = "https://sourceforge.net/projects/linux-ima/";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ tstrobel ]; maintainers = with lib.maintainers; [ tstrobel ];
}; };
} }

View File

@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
''; '';
postFixup = '' postFixup = ''
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ intel-gmmlib intel-graphics-compiler libva stdenv.cc.cc.lib ]} \ patchelf --set-rpath ${lib.makeLibraryPath [ intel-gmmlib intel-graphics-compiler libva stdenv.cc.cc.lib ]} \
$out/lib/intel-opencl/libigdrcl.so $out/lib/intel-opencl/libigdrcl.so
''; '';

View File

@ -1,4 +1,4 @@
{ stdenv, fetchzip, rpmextract, ncurses5, numactl, zlib }: { lib, stdenv, fetchzip, rpmextract, ncurses5, numactl, zlib }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "intel-ocl"; pname = "intel-ocl";
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
sourceRoot = "."; sourceRoot = ".";
libPath = stdenv.lib.makeLibraryPath [ libPath = lib.makeLibraryPath [
stdenv.cc.cc.lib stdenv.cc.cc.lib
ncurses5 ncurses5
numactl numactl
@ -66,8 +66,8 @@ stdenv.mkDerivation rec {
meta = { meta = {
description = "Official OpenCL runtime for Intel CPUs"; description = "Official OpenCL runtime for Intel CPUs";
homepage = "https://software.intel.com/en-us/articles/opencl-drivers"; homepage = "https://software.intel.com/en-us/articles/opencl-drivers";
license = stdenv.lib.licenses.unfree; license = lib.licenses.unfree;
platforms = [ "x86_64-linux" ]; platforms = [ "x86_64-linux" ];
maintainers = [ stdenv.lib.maintainers.kierdavis ]; maintainers = [ lib.maintainers.kierdavis ];
}; };
} }

View File

@ -1,9 +1,9 @@
{ stdenv, fetchurl, pkgconfig, pruneLibtoolFiles, flex, bison { lib, stdenv, fetchurl, pkgconfig, pruneLibtoolFiles, flex, bison
, libmnl, libnetfilter_conntrack, libnfnetlink, libnftnl, libpcap , libmnl, libnetfilter_conntrack, libnfnetlink, libnftnl, libpcap
, nftablesCompat ? false , nftablesCompat ? false
}: }:
with stdenv.lib; with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.8.6"; version = "1.8.6";

View File

@ -1,9 +1,9 @@
{ stdenv, fetchFromGitHub, fetchpatch { lib, stdenv, fetchFromGitHub, fetchpatch
, meson, ninja, pkgconfig, gettext, libxslt, docbook_xsl_ns , meson, ninja, pkgconfig, gettext, libxslt, docbook_xsl_ns
, libcap, libidn2 , libcap, libidn2
}: }:
with stdenv.lib; with lib;
let let
version = "20200821"; version = "20200821";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, ncurses, libcap_ng }: { lib, stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, ncurses, libcap_ng }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "irqbalance"; pname = "irqbalance";
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
meta = { meta = {
homepage = "https://github.com/Irqbalance/irqbalance"; homepage = "https://github.com/Irqbalance/irqbalance";
description = "A daemon to help balance the cpu load generated by interrupts across all of a systems cpus"; description = "A daemon to help balance the cpu load generated by interrupts across all of a systems cpus";
license = stdenv.lib.licenses.gpl2; license = lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux; platforms = lib.platforms.linux;
}; };
} }

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkg-config, libnl }: { lib, stdenv, fetchurl, pkg-config, libnl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "iw"; pname = "iw";
@ -23,8 +23,8 @@ stdenv.mkDerivation rec {
deprecated and it's strongly recommended to switch to iw and nl80211. deprecated and it's strongly recommended to switch to iw and nl80211.
''; '';
homepage = "https://wireless.wiki.kernel.org/en/users/Documentation/iw"; homepage = "https://wireless.wiki.kernel.org/en/users/Documentation/iw";
license = stdenv.lib.licenses.isc; license = lib.licenses.isc;
maintainers = with stdenv.lib.maintainers; [ viric primeos ]; maintainers = with lib.maintainers; [ viric primeos ];
platforms = with stdenv.lib.platforms; linux; platforms = with lib.platforms; linux;
}; };
} }

Some files were not shown because too many files have changed in this diff Show More