diff options
-rw-r--r-- | pkgs/applications/audio/moc/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/office/trilium/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/video/obs-studio/default.nix | 8 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.4.4.nix | 2 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/head.nix | 2 | ||||
-rw-r--r-- | pkgs/development/python-modules/scapy/default.nix | 14 | ||||
-rw-r--r-- | pkgs/development/tools/misc/watson-ruby/default.nix | 17 | ||||
-rw-r--r-- | pkgs/misc/emulators/retroarch/default.nix | 4 | ||||
-rw-r--r-- | pkgs/os-specific/linux/sysdig/default.nix | 2 | ||||
-rw-r--r-- | pkgs/shells/zsh/grml-zsh-config/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/backup/lvmsync/default.nix | 25 | ||||
-rw-r--r-- | pkgs/tools/misc/ldmtool/default.nix | 52 | ||||
-rw-r--r-- | pkgs/tools/misc/pws/default.nix | 18 | ||||
-rw-r--r-- | pkgs/tools/networking/maphosts/default.nix | 16 | ||||
-rw-r--r-- | pkgs/tools/security/fwknop/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/system/testdisk/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/text/mdcat/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/text/reckon/default.nix | 14 |
18 files changed, 90 insertions, 98 deletions
diff --git a/pkgs/applications/audio/moc/default.nix b/pkgs/applications/audio/moc/default.nix index 89d062d584e56..5615f4cace3dc 100644 --- a/pkgs/applications/audio/moc/default.nix +++ b/pkgs/applications/audio/moc/default.nix @@ -57,7 +57,7 @@ in stdenv.mkDerivation rec { ++ opt midiSupport timidity ++ opt modplugSupport libmodplug ++ opt mp3Support libmad - ++ opt musepackSupport [ libmpc libmpcdec taglib ] + ++ stdenv.lib.optionals musepackSupport [ libmpc libmpcdec taglib ] ++ opt vorbisSupport libvorbis ++ opt speexSupport speex ++ opt (ffmpegSupport && !withffmpeg4) ffmpeg diff --git a/pkgs/applications/office/trilium/default.nix b/pkgs/applications/office/trilium/default.nix index d44b51861dc54..28548091f6ea6 100644 --- a/pkgs/applications/office/trilium/default.nix +++ b/pkgs/applications/office/trilium/default.nix @@ -48,7 +48,7 @@ in { wrapGAppsHook ]; - buildInputs = [ atomEnv.packages gtk3 ]; + buildInputs = atomEnv.packages ++ [ gtk3 ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/applications/video/obs-studio/default.nix b/pkgs/applications/video/obs-studio/default.nix index fdcfd7e0bec36..82462f4e2c28c 100644 --- a/pkgs/applications/video/obs-studio/default.nix +++ b/pkgs/applications/video/obs-studio/default.nix @@ -34,7 +34,7 @@ }: let - optional = stdenv.lib.optional; + inherit (stdenv.lib) optional optionals; in mkDerivation rec { pname = "obs-studio"; version = "24.0.4"; @@ -46,9 +46,7 @@ in mkDerivation rec { sha256 = "0m15ch2ix9qrdf1a9mj7wcpl72z3h13zx60c9q72sb1435id2g1q"; }; - nativeBuildInputs = [ cmake - pkgconfig - ]; + nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ curl fdk_aac @@ -68,7 +66,7 @@ in mkDerivation rec { makeWrapper mbedtls ] - ++ optional scriptingSupport [ luajit swig python3 ] + ++ optionals scriptingSupport [ luajit swig python3 ] ++ optional alsaSupport alsaLib ++ optional pulseaudioSupport libpulseaudio; diff --git a/pkgs/development/compilers/ghc/8.4.4.nix b/pkgs/development/compilers/ghc/8.4.4.nix index 73c7e4708d5c2..aa29635fee0dc 100644 --- a/pkgs/development/compilers/ghc/8.4.4.nix +++ b/pkgs/development/compilers/ghc/8.4.4.nix @@ -69,7 +69,7 @@ let ''; # Splicer will pull out correct variations - libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ] + libDeps = platform: stdenv.lib.optional enableTerminfo ncurses ++ stdenv.lib.optional (!enableIntegerSimple) gmp ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 8d22c0a674bc8..e9ecdedf3716c 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -74,7 +74,7 @@ let ''; # Splicer will pull out correct variations - libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ] + libDeps = platform: stdenv.lib.optional enableTerminfo ncurses ++ stdenv.lib.optional (!enableIntegerSimple) gmp ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv ++ stdenv.lib.optional enableDwarf elfutils; diff --git a/pkgs/development/python-modules/scapy/default.nix b/pkgs/development/python-modules/scapy/default.nix index 8f51b1eda2129..4f058a0761bdd 100644 --- a/pkgs/development/python-modules/scapy/default.nix +++ b/pkgs/development/python-modules/scapy/default.nix @@ -34,13 +34,13 @@ buildPythonPackage rec { ''; propagatedBuildInputs = [ pycrypto ecdsa ] - ++ lib.optional withOptionalDeps [ tcpdump ipython ] - ++ lib.optional withCryptography [ cryptography ] - ++ lib.optional withVoipSupport [ sox ] - ++ lib.optional withPlottingSupport [ matplotlib ] - ++ lib.optional withGraphicsSupport [ pyx texlive.combined.scheme-minimal graphviz imagemagick ] - ++ lib.optional (isPy3k && pythonOlder "3.4") [ enum34 ] - ++ lib.optional doCheck [ mock ]; + ++ lib.optionals withOptionalDeps [ tcpdump ipython ] + ++ lib.optional withCryptography cryptography + ++ lib.optional withVoipSupport sox + ++ lib.optional withPlottingSupport matplotlib + ++ lib.optionals withGraphicsSupport [ pyx texlive.combined.scheme-minimal graphviz imagemagick ] + ++ lib.optional (isPy3k && pythonOlder "3.4") enum34 + ++ lib.optional doCheck mock; # Tests fail with Python 3.6 (seems to be an upstream bug, I'll investigate) doCheck = if isPy3k then false else true; diff --git a/pkgs/development/tools/misc/watson-ruby/default.nix b/pkgs/development/tools/misc/watson-ruby/default.nix index e1726efc40c1f..64e04455abe6a 100644 --- a/pkgs/development/tools/misc/watson-ruby/default.nix +++ b/pkgs/development/tools/misc/watson-ruby/default.nix @@ -1,20 +1,19 @@ { stdenv, bundlerEnv, ruby, bundlerUpdateScript }: - stdenv.mkDerivation rec { pname = "watson-ruby"; version = (import ./gemset.nix).watson-ruby.version; - env = bundlerEnv { - name = "watson-ruby-gems-${version}"; - inherit ruby; - # expects Gemfile, Gemfile.lock and gemset.nix in the same directory - gemdir = ./.; - }; - phases = [ "installPhase" ]; - installPhase = '' + installPhase = let + env = bundlerEnv { + name = "watson-ruby-gems-${version}"; + inherit ruby; + # expects Gemfile, Gemfile.lock and gemset.nix in the same directory + gemdir = ./.; + }; + in '' mkdir -p $out/bin ln -s ${env}/bin/watson $out/bin/watson ''; diff --git a/pkgs/misc/emulators/retroarch/default.nix b/pkgs/misc/emulators/retroarch/default.nix index 0333e0fec2ae1..3f14258b0c013 100644 --- a/pkgs/misc/emulators/retroarch/default.nix +++ b/pkgs/misc/emulators/retroarch/default.nix @@ -39,11 +39,11 @@ in stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig ] - ++ optionals withVulkan [ makeWrapper ]; + ++ optional withVulkan makeWrapper; buildInputs = [ ffmpeg freetype libxml2 libGLU libGL python3 SDL2 which ] ++ optional enableNvidiaCgToolkit nvidia_cg_toolkit - ++ optionals withVulkan [ vulkan-loader ] + ++ optional withVulkan vulkan-loader ++ optionals stdenv.isDarwin [ libobjc AppKit Foundation ] ++ optionals stdenv.isLinux [ alsaLib libdrm libpulseaudio libv4l libX11 libXdmcp libXext libXxf86vm mesa udev ]; diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix index 4008045938ee9..61a51afa3a75e 100644 --- a/pkgs/os-specific/linux/sysdig/default.nix +++ b/pkgs/os-specific/linux/sysdig/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake perl ]; buildInputs = [ zlib luajit ncurses jsoncpp libb64 openssl curl jq gcc elfutils tbb c-ares protobuf grpc - ] ++ optional (kernel != null) kernel.moduleBuildDependencies; + ] ++ optionals (kernel != null) kernel.moduleBuildDependencies; hardeningDisable = [ "pic" ]; diff --git a/pkgs/shells/zsh/grml-zsh-config/default.nix b/pkgs/shells/zsh/grml-zsh-config/default.nix index 80f51dbb763f2..d23999abf3da9 100644 --- a/pkgs/shells/zsh/grml-zsh-config/default.nix +++ b/pkgs/shells/zsh/grml-zsh-config/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ zsh coreutils txt2tags procps ] - ++ optional stdenv.isLinux [ inetutils ]; + ++ optional stdenv.isLinux inetutils; buildPhase = '' cd doc diff --git a/pkgs/tools/backup/lvmsync/default.nix b/pkgs/tools/backup/lvmsync/default.nix index 8c23d804d0b80..a52c6bf1ba7c3 100644 --- a/pkgs/tools/backup/lvmsync/default.nix +++ b/pkgs/tools/backup/lvmsync/default.nix @@ -1,27 +1,22 @@ { stdenv, bundlerEnv, ruby, bundlerUpdateScript, makeWrapper }: -let - +stdenv.mkDerivation rec { pname = "lvmsync"; version = (import ./gemset.nix).${pname}.version; -in stdenv.mkDerivation rec { - - name = "${pname}-${version}"; - - env = bundlerEnv { - name = "${pname}-${version}-gems"; - ruby = ruby; - gemfile = ./Gemfile; - lockfile = ./Gemfile.lock; - gemset = ./gemset.nix; - }; - buildInputs = [ makeWrapper ]; phases = ["installPhase"]; - installPhase = '' + installPhase = let + env = bundlerEnv { + name = "${pname}-${version}-gems"; + ruby = ruby; + gemfile = ./Gemfile; + lockfile = ./Gemfile.lock; + gemset = ./gemset.nix; + }; + in '' mkdir -p $out/bin makeWrapper ${env}/bin/lvmsync $out/bin/lvmsync ''; diff --git a/pkgs/tools/misc/ldmtool/default.nix b/pkgs/tools/misc/ldmtool/default.nix index 734586fb1ab3f..2ec683484958c 100644 --- a/pkgs/tools/misc/ldmtool/default.nix +++ b/pkgs/tools/misc/ldmtool/default.nix @@ -3,15 +3,15 @@ , fetchpatch }: stdenv.mkDerivation rec { - pname = "ldmtool"; - version = "0.2.4"; + pname = "ldmtool"; + version = "0.2.4"; - src = fetchFromGitHub { - owner = "mdbooth"; - repo = "libldm"; - rev = "libldm-${version}"; - sha256 = "1fy5wbmk8kwl86lzswq0d1z2j5y023qzfm2ppm8knzv9c47kniqk"; - }; + src = fetchFromGitHub { + owner = "mdbooth"; + repo = "libldm"; + rev = "libldm-${version}"; + sha256 = "1fy5wbmk8kwl86lzswq0d1z2j5y023qzfm2ppm8knzv9c47kniqk"; + }; patches = [ # Remove useage of deprecrated G_PARAM_PRIVATE @@ -21,26 +21,26 @@ stdenv.mkDerivation rec { }) ]; - preConfigure = '' - sed -i docs/reference/ldmtool/Makefile.am \ - -e 's|-nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl|--nonet ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl|g' - ''; + preConfigure = '' + sed -i docs/reference/ldmtool/Makefile.am \ + -e 's|-nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl|--nonet ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl|g' + ''; - # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; + # glib-2.62 deprecations + NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; - configureScript = "sh autogen.sh"; + configureScript = "sh autogen.sh"; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ autoconf automake gtk-doc lvm2 libxslt.bin - libtool readline gobject-introspection json-glib libuuid - ]; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ autoconf automake gtk-doc lvm2 libxslt.bin + libtool readline gobject-introspection json-glib libuuid + ]; - meta = with stdenv.lib; { - description = "Tool and library for managing Microsoft Windows Dynamic Disks"; - homepage = https://github.com/mdbooth/libldm; - maintainers = with maintainers; [ jensbin ]; - license = licenses.gpl3; - platforms = platforms.linux; - }; + meta = with stdenv.lib; { + description = "Tool and library for managing Microsoft Windows Dynamic Disks"; + homepage = https://github.com/mdbooth/libldm; + maintainers = with maintainers; [ jensbin ]; + license = licenses.gpl3; + platforms = platforms.linux; + }; } diff --git a/pkgs/tools/misc/pws/default.nix b/pkgs/tools/misc/pws/default.nix index d5f2fd4afd4fe..50952435dd766 100644 --- a/pkgs/tools/misc/pws/default.nix +++ b/pkgs/tools/misc/pws/default.nix @@ -3,19 +3,19 @@ stdenv.mkDerivation rec { name = "pws-${(import ./gemset.nix).pws.version}"; - env = bundlerEnv { - name = "${name}-gems"; - - inherit ruby; - - gemdir = ./.; - }; - buildInputs = [ makeWrapper ]; phases = ["installPhase"]; - installPhase = '' + installPhase = let + env = bundlerEnv { + name = "${name}-gems"; + + inherit ruby; + + gemdir = ./.; + }; + in '' mkdir -p $out/bin makeWrapper ${env}/bin/pws $out/bin/pws \ --set PATH '"${xsel}/bin/:$PATH"' diff --git a/pkgs/tools/networking/maphosts/default.nix b/pkgs/tools/networking/maphosts/default.nix index e54a2b21d9fd9..6b5fded40dd9d 100644 --- a/pkgs/tools/networking/maphosts/default.nix +++ b/pkgs/tools/networking/maphosts/default.nix @@ -1,17 +1,17 @@ { stdenv, lib, bundlerEnv, ruby, bundlerUpdateScript }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { name = "maphosts-${env.gems.maphosts.version}"; - env = bundlerEnv { - name = "maphosts-gems"; - inherit ruby; - gemdir = ./.; - }; - phases = ["installPhase"]; - installPhase = '' + installPhase = let + env = bundlerEnv { + name = "maphosts-gems"; + inherit ruby; + gemdir = ./.; + }; + in '' mkdir -p "$out/bin" ln -s "${env}/bin/maphosts" "$out/bin/maphosts" ''; diff --git a/pkgs/tools/security/fwknop/default.nix b/pkgs/tools/security/fwknop/default.nix index 4579136add26b..a9f69c8b96e12 100644 --- a/pkgs/tools/security/fwknop/default.nix +++ b/pkgs/tools/security/fwknop/default.nix @@ -19,8 +19,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ libpcap texinfo ] - ++ stdenv.lib.optional gnupgSupport [ gnupg gpgme.dev ] - ++ stdenv.lib.optional wgetSupport [ wget ]; + ++ stdenv.lib.optionals gnupgSupport [ gnupg gpgme.dev ] + ++ stdenv.lib.optionals wgetSupport [ wget ]; configureFlags = [ "--sysconfdir=/etc" diff --git a/pkgs/tools/system/testdisk/default.nix b/pkgs/tools/system/testdisk/default.nix index 9cec99145b9ce..ad11cd2e3b65c 100644 --- a/pkgs/tools/system/testdisk/default.nix +++ b/pkgs/tools/system/testdisk/default.nix @@ -37,7 +37,7 @@ assert enableQt -> qwt != null; ] ++ stdenv.lib.optional enableNtfs ntfs3g ++ stdenv.lib.optional enableExtFs e2fsprogs - ++ stdenv.lib.optional enableQt [ qtbase qttools qwt ]; + ++ stdenv.lib.optionals enableQt [ qtbase qttools qwt ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/tools/text/mdcat/default.nix b/pkgs/tools/text/mdcat/default.nix index 4139771b5cb22..626963bc60103 100644 --- a/pkgs/tools/text/mdcat/default.nix +++ b/pkgs/tools/text/mdcat/default.nix @@ -12,7 +12,7 @@ rustPlatform.buildRustPackage rec { }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ (stdenv.lib.optional stdenv.isDarwin Security) openssl ]; + buildInputs = [ openssl ] ++ stdenv.lib.optional stdenv.isDarwin Security; cargoSha256 = "1hxsfls6fpllc9yg5ib3qz6pa62j1y1va8a6356j6812csk4ifnn"; diff --git a/pkgs/tools/text/reckon/default.nix b/pkgs/tools/text/reckon/default.nix index 25e9c07f351e7..261149229b646 100644 --- a/pkgs/tools/text/reckon/default.nix +++ b/pkgs/tools/text/reckon/default.nix @@ -4,17 +4,17 @@ stdenv.mkDerivation rec { pname = "reckon"; version = (import ./gemset.nix).reckon.version; - env = bundlerEnv { - name = "${pname}-${version}-gems"; - - gemdir = ./.; - }; - phases = [ "installPhase" ]; buildInputs = [ makeWrapper ]; - installPhase = '' + installPhase = let + env = bundlerEnv { + name = "${pname}-${version}-gems"; + + gemdir = ./.; + }; + in '' mkdir -p $out/bin makeWrapper ${env}/bin/reckon $out/bin/reckon ''; |