treewide: fix types for mkDerivation params

This commit is contained in:
Robin Gloster 2019-11-10 02:13:39 +01:00 committed by Jan Tojnar
parent 81ffabdf4f
commit 006242fd5a
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
18 changed files with 90 additions and 98 deletions

View File

@ -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

View File

@ -48,7 +48,7 @@ in {
wrapGAppsHook
];
buildInputs = [ atomEnv.packages gtk3 ];
buildInputs = atomEnv.packages ++ [ gtk3 ];
installPhase = ''
mkdir -p $out/bin

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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
'';

View File

@ -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 ];

View File

@ -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" ];

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [ zsh coreutils txt2tags procps ]
++ optional stdenv.isLinux [ inetutils ];
++ optional stdenv.isLinux inetutils;
buildPhase = ''
cd doc

View File

@ -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
'';

View File

@ -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;
};
}

View File

@ -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"'

View File

@ -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"
'';

View File

@ -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"

View File

@ -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 ];

View File

@ -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";

View File

@ -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
'';