Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
a16b2fa
xcpc: remove 'with lib;'
Stunkymonkey Aug 13, 2024
c67a176
noice: remove 'with lib;'
Stunkymonkey Aug 13, 2024
b9228ed
figma-linux: remove 'with lib;'
Stunkymonkey Aug 13, 2024
a83d219
gscan2pdf: remove 'with lib;'
Stunkymonkey Aug 13, 2024
3d9fb1e
image_optim: remove 'with lib;'
Stunkymonkey Aug 13, 2024
80e5c0f
rx: remove 'with lib;'
Stunkymonkey Aug 13, 2024
35cc595
sane: remove 'with lib;'
Stunkymonkey Aug 13, 2024
46a6828
sxiv: remove 'with lib;'
Stunkymonkey Aug 13, 2024
1c98318
hadoop: remove 'with lib;'
Stunkymonkey Aug 13, 2024
d4589f7
tryton: remove 'with lib;'
Stunkymonkey Aug 13, 2024
53aee61
marvin: remove 'with lib;'
Stunkymonkey Aug 13, 2024
0ccaf3e
fped: remove 'with lib;'
Stunkymonkey Aug 13, 2024
e9dd943
monosat: remove 'with lib;'
Stunkymonkey Aug 13, 2024
92641c5
z3: remove 'with lib;'
Stunkymonkey Aug 13, 2024
2acc540
ripser: remove 'with lib;'
Stunkymonkey Aug 13, 2024
ca292ab
wolfram-engine: remove 'with lib;'
Stunkymonkey Aug 13, 2024
62fec0d
dcmtk: remove 'with lib;'
Stunkymonkey Aug 13, 2024
a60e00a
simgrid: remove 'with lib;'
Stunkymonkey Aug 13, 2024
914b062
rxvt-unicode: remove 'with lib;'
Stunkymonkey Aug 13, 2024
b29d3c7
git-octopus: remove 'with lib;'
Stunkymonkey Aug 13, 2024
72c90f9
gitkraken: remove 'with lib;'
Stunkymonkey Aug 13, 2024
91421d1
gogs: remove 'with lib;'
Stunkymonkey Aug 13, 2024
1da103b
mpvScripts: remove 'with lib;'
Stunkymonkey Aug 13, 2024
2fafe33
vcs: remove 'with lib;'
Stunkymonkey Aug 13, 2024
8a422e6
docker: remove 'with lib;'
Stunkymonkey Aug 13, 2024
6c00cab
virt-viewer: remove 'with lib;'
Stunkymonkey Aug 13, 2024
8785381
virtualbox: remove 'with lib;'
Stunkymonkey Aug 13, 2024
e02880c
fluxbox: remove 'with lib;'
Stunkymonkey Aug 13, 2024
6db123d
i3blocks-gaps: remove 'with lib;'
Stunkymonkey Aug 13, 2024
a7bc147
i3blocks: remove 'with lib;'
Stunkymonkey Aug 13, 2024
19e9c5e
deepin.dde-gsettings-schemas: remove 'with lib;'
Stunkymonkey Aug 13, 2024
3fcb7b1
flutter: remove 'with lib;'
Stunkymonkey Aug 13, 2024
7ea475f
samsung-unified-linux-driver_1_00_36: remove 'with lib;'
Stunkymonkey Aug 13, 2024
0b0643e
libcardiacarrest: remove 'with lib;'
Stunkymonkey Aug 13, 2024
9fb93de
stabber: remove 'with lib;'
Stunkymonkey Aug 13, 2024
114574a
sundtek: remove 'with lib;'
Stunkymonkey Aug 13, 2024
5eec005
conky: remove 'with lib;'
Stunkymonkey Aug 13, 2024
3bc1a9d
pure-prompt: remove 'with lib;'
Stunkymonkey Aug 13, 2024
cae2ae5
grml-zsh-config: remove 'with lib;'
Stunkymonkey Aug 13, 2024
3f34101
wpa_supplicant: remove 'with lib;'
Stunkymonkey Aug 13, 2024
737bb98
mwprocapture: remove 'with lib;'
Stunkymonkey Aug 13, 2024
bb4290c
setools: remove 'with lib;'
Stunkymonkey Aug 13, 2024
427d8d3
selinux-sandbox: remove 'with lib;'
Stunkymonkey Aug 13, 2024
63ed9a2
selinux-python: remove 'with lib;'
Stunkymonkey Aug 13, 2024
041a8f1
rtl8192eu: remove 'with lib;'
Stunkymonkey Aug 13, 2024
d8b1932
libsemanage: remove 'with lib;'
Stunkymonkey Aug 13, 2024
15ef40d
libselinux: remove 'with lib;'
Stunkymonkey Aug 13, 2024
6091380
rtl8192su-firmware: remove 'with lib;'
Stunkymonkey Aug 13, 2024
b41669e
cygwin-setup: remove 'with lib;'
Stunkymonkey Aug 13, 2024
5d6f112
linux: remove 'with lib;'
Stunkymonkey Aug 13, 2024
b2a45fb
linux/hardened: remove 'with lib;'
Stunkymonkey Aug 13, 2024
b9d9cd0
linuxPackages.nvidiaPackages: remove 'with lib;'
Stunkymonkey Aug 13, 2024
72c0ec7
julia.withPackages: remove 'with lib;'
Stunkymonkey Aug 13, 2024
8eaeb5e
tests.kernel-config: remove 'with lib;'
Stunkymonkey Aug 13, 2024
d43f8e1
wolfram-engine: remove 'with lib;'
Stunkymonkey Aug 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pkgs/applications/emulators/xcpc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
, motifSupport ? false, lesstif
}:

with lib;
stdenv.mkDerivation rec {
version = "20070122";
pname = "xcpc";
Expand All @@ -16,10 +15,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];

buildInputs = [ glib libdsk libXaw libX11 libXext ]
++ optional libDSKSupport libdsk
++ optional motifSupport lesstif;
++ lib.optional libDSKSupport libdsk
++ lib.optional motifSupport lesstif;

meta = {
meta = with lib; {
description = "Portable Amstrad CPC 464/664/6128 emulator written in C";
homepage = "https://www.xcpc-emulator.net";
license = licenses.gpl2Plus;
Expand Down
8 changes: 3 additions & 5 deletions pkgs/applications/file-managers/noice/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{ lib, stdenv, fetchgit, ncurses, conf ? null }:

with lib;

stdenv.mkDerivation rec {
pname = "noice";
version = "0.8";
Expand All @@ -18,16 +16,16 @@ stdenv.mkDerivation rec {
substituteInPlace noice.c --replace 'printw(str);' 'printw("%s", str);'
'';

configFile = optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
configFile = lib.optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
preBuild = lib.optionalString (conf!=null) "cp ${configFile} config.def.h";

buildInputs = [ ncurses ];

buildFlags = [ "LDLIBS=-lncurses" ];

installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];

meta = {
meta = with lib; {
description = "Small ncurses-based file browser";
homepage = "https://git.2f30.org/noice/";
license = licenses.bsd2;
Expand Down
3 changes: 1 addition & 2 deletions pkgs/applications/graphics/figma-linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
, wrapGAppsHook3
, ...
}:
with lib;
stdenv.mkDerivation (finalAttrs: {
pname = "figma-linux";
version = "0.11.4";
Expand Down Expand Up @@ -82,7 +81,7 @@ stdenv.mkDerivation (finalAttrs: {
--replace "Exec=/opt/figma-linux/figma-linux" "Exec=$out/bin/${finalAttrs.pname}"
'';

meta = {
meta = with lib; {
description = "Unofficial Electron-based Figma desktop app for Linux";
homepage = "https://github.com/Figma-Linux/figma-linux";
platforms = [ "x86_64-linux" ];
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/graphics/gscan2pdf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
# test dependencies
xvfb-run, liberation_ttf, file, tesseract }:

with lib;

perlPackages.buildPerlPackage rec {
pname = "gscan2pdf";
version = "2.13.3";
Expand Down Expand Up @@ -132,7 +130,7 @@ perlPackages.buildPerlPackage rec {
make test
'';

meta = {
meta = with lib; {
description = "GUI to produce PDFs or DjVus from scanned documents";
homepage = "https://gscan2pdf.sourceforge.net/";
license = licenses.gpl3;
Expand Down
52 changes: 25 additions & 27 deletions pkgs/applications/graphics/image_optim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,32 @@
withSvgo ? true, svgo
}:

with lib;

let
optionalDepsPath = optional withPngcrush pngcrush
++ optional withPngout pngout
++ optional withAdvpng advancecomp
++ optional withOptipng optipng
++ optional withPngquant pngquant
++ optional withOxipng oxipng
++ optional withJhead jhead
++ optional withJpegoptim jpegoptim
++ optional withJpegrecompress jpeg-archive
++ optional withJpegtran libjpeg
++ optional withGifsicle gifsicle
++ optional withSvgo svgo;
optionalDepsPath = lib.optional withPngcrush pngcrush
++ lib.optional withPngout pngout
++ lib.optional withAdvpng advancecomp
++ lib.optional withOptipng optipng
++ lib.optional withPngquant pngquant
++ lib.optional withOxipng oxipng
++ lib.optional withJhead jhead
++ lib.optional withJpegoptim jpegoptim
++ lib.optional withJpegrecompress jpeg-archive
++ lib.optional withJpegtran libjpeg
++ lib.optional withGifsicle gifsicle
++ lib.optional withSvgo svgo;

disabledWorkersFlags = optional (!withPngcrush) "--no-pngcrush"
++ optional (!withPngout) "--no-pngout"
++ optional (!withAdvpng) "--no-advpng"
++ optional (!withOptipng) "--no-optipng"
++ optional (!withPngquant) "--no-pngquant"
++ optional (!withOxipng) "--no-oxipng"
++ optional (!withJhead) "--no-jhead"
++ optional (!withJpegoptim) "--no-jpegoptim"
++ optional (!withJpegrecompress) "--no-jpegrecompress"
++ optional (!withJpegtran) "--no-jpegtran"
++ optional (!withGifsicle) "--no-gifsicle"
++ optional (!withSvgo) "--no-svgo";
disabledWorkersFlags = lib.optional (!withPngcrush) "--no-pngcrush"
++ lib.optional (!withPngout) "--no-pngout"
++ lib.optional (!withAdvpng) "--no-advpng"
++ lib.optional (!withOptipng) "--no-optipng"
++ lib.optional (!withPngquant) "--no-pngquant"
++ lib.optional (!withOxipng) "--no-oxipng"
++ lib.optional (!withJhead) "--no-jhead"
++ lib.optional (!withJpegoptim) "--no-jpegoptim"
++ lib.optional (!withJpegrecompress) "--no-jpegrecompress"
++ lib.optional (!withJpegtran) "--no-jpegtran"
++ lib.optional (!withGifsicle) "--no-gifsicle"
++ lib.optional (!withSvgo) "--no-svgo";
in

bundlerApp {
Expand All @@ -53,7 +51,7 @@ bundlerApp {

postBuild = ''
wrapProgram $out/bin/image_optim \
--prefix PATH : ${lib.escapeShellArg (makeBinPath optionalDepsPath)} \
--prefix PATH : ${lib.escapeShellArg (lib.makeBinPath optionalDepsPath)} \
--add-flags "${lib.concatStringsSep " " disabledWorkersFlags}"
'';

Expand Down
8 changes: 3 additions & 5 deletions pkgs/applications/graphics/rx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
, xorg ? null
, libGL ? null }:

with lib;

rustPlatform.buildRustPackage rec {
pname = "rx";
version = "0.5.2";
Expand All @@ -20,7 +18,7 @@ rustPlatform.buildRustPackage rec {

nativeBuildInputs = [ cmake pkg-config makeWrapper ];

buildInputs = optionals stdenv.isLinux
buildInputs = lib.optionals stdenv.isLinux
(with xorg; [
# glfw-sys dependencies:
libX11 libXrandr libXinerama libXcursor libXi libXext
Expand All @@ -29,13 +27,13 @@ rustPlatform.buildRustPackage rec {
# FIXME: GLFW (X11) requires DISPLAY env variable for all tests
doCheck = false;

postInstall = optionalString stdenv.isLinux ''
postInstall = lib.optionalString stdenv.isLinux ''
mkdir -p $out/share/applications
cp $src/rx.desktop $out/share/applications
wrapProgram $out/bin/rx --prefix LD_LIBRARY_PATH : ${libGL}/lib
'';

meta = {
meta = with lib; {
description = "Modern and extensible pixel editor implemented in Rust";
mainProgram = "rx";
homepage = "https://rx.cloudhead.io/";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/graphics/sane/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{ paths, disabledDefaultBackends ? [] }:

with lib;

let
installSanePath = path: ''
if [ -e "${path}/lib/sane" ]; then
Expand Down Expand Up @@ -48,6 +48,6 @@ stdenv.mkDerivation {

mkdir -p $out/etc/sane.d $out/etc/sane.d/dll.d $out/lib/sane
''
+ (concatMapStrings installSanePath paths)
+ (concatMapStrings disableBackend disabledDefaultBackends);
+ (lib.concatMapStrings installSanePath paths)
+ (lib.concatMapStrings disableBackend disabledDefaultBackends);
}
8 changes: 3 additions & 5 deletions pkgs/applications/graphics/sxiv/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{ lib, stdenv, fetchFromGitHub, libXft, imlib2, giflib, libexif, conf ? null }:

with lib;

stdenv.mkDerivation rec {
pname = "sxiv";
version = "26";
Expand All @@ -13,8 +11,8 @@ stdenv.mkDerivation rec {
sha256 = "0xaawlfdy7b277m38mgg4423kd7p1ffn0dq4hciqs6ivbb3q9c4f";
};

configFile = optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
configFile = lib.optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
preBuild = lib.optionalString (conf!=null) "cp ${configFile} config.def.h";

buildInputs = [ libXft imlib2 giflib libexif ];

Expand All @@ -24,7 +22,7 @@ stdenv.mkDerivation rec {
install -Dt $out/share/applications sxiv.desktop
'';

meta = {
meta = with lib; {
description = "Simple X Image Viewer";
homepage = "https://github.com/muennich/sxiv";
license = lib.licenses.gpl2Plus;
Expand Down
34 changes: 16 additions & 18 deletions pkgs/applications/networking/cluster/hadoop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
, callPackage
}:

with lib;

assert elem stdenv.system [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
assert lib.elem stdenv.system [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];

let
common = { pname, platformAttrs, jdk, tests }:
Expand All @@ -34,7 +32,7 @@ let
version = platformAttrs.${stdenv.system}.version or (throw "Unsupported system: ${stdenv.system}");
src = fetchurl {
url = "mirror://apache/hadoop/common/hadoop-${finalAttrs.version}/hadoop-${finalAttrs.version}"
+ optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz";
+ lib.optionalString stdenv.isAarch64 "-aarch64" + ".tar.gz";
inherit (platformAttrs.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}")) hash;
};
doCheck = true;
Expand All @@ -47,24 +45,24 @@ let
}) else "";

nativeBuildInputs = [ makeWrapper ]
++ optionals stdenv.isLinux [ autoPatchelfHook ];
buildInputs = optionals stdenv.isLinux [ stdenv.cc.cc.lib openssl protobuf zlib snappy libtirpc ];
++ lib.optionals stdenv.isLinux [ autoPatchelfHook ];
buildInputs = lib.optionals stdenv.isLinux [ stdenv.cc.cc.lib openssl protobuf zlib snappy libtirpc ];

installPhase = ''
mkdir $out
mv * $out/
'' + optionalString stdenv.isLinux ''
'' + lib.optionalString stdenv.isLinux ''
for n in $(find ${finalAttrs.containerExecutor}/bin -type f); do
ln -sf "$n" $out/bin
done

# these libraries are loaded at runtime by the JVM
ln -s ${getLib cyrus_sasl}/lib/libsasl2.so $out/lib/native/libsasl2.so.2
ln -s ${getLib openssl}/lib/libcrypto.so $out/lib/native/
ln -s ${getLib zlib}/lib/libz.so.1 $out/lib/native/
ln -s ${getLib zstd}/lib/libzstd.so.1 $out/lib/native/
ln -s ${getLib bzip2}/lib/libbz2.so.1 $out/lib/native/
ln -s ${getLib snappy}/lib/libsnappy.so.1 $out/lib/native/
ln -s ${lib.getLib cyrus_sasl}/lib/libsasl2.so $out/lib/native/libsasl2.so.2
ln -s ${lib.getLib openssl}/lib/libcrypto.so $out/lib/native/
ln -s ${lib.getLib zlib}/lib/libz.so.1 $out/lib/native/
ln -s ${lib.getLib zstd}/lib/libzstd.so.1 $out/lib/native/
ln -s ${lib.getLib bzip2}/lib/libbz2.so.1 $out/lib/native/
ln -s ${lib.getLib snappy}/lib/libsnappy.so.1 $out/lib/native/

# libjvm.so is in different paths for java 8 and 11
# libnativetask.so in hadooop 3 and libhdfs.so in hadoop 2 depend on it
Expand All @@ -76,7 +74,7 @@ let
# hadoop 3.3+ depends on protobuf 3.18, 3.2 depends on 3.8
find $out/lib/native -name 'libhdfspp.so*' | \
xargs -r -n1 patchelf --replace-needed libprotobuf.so.${
if (versionAtLeast finalAttrs.version "3.3") then "18"
if (lib.versionAtLeast finalAttrs.version "3.3") then "18"
else "8"
} libprotobuf.so

Expand All @@ -90,17 +88,17 @@ let
--set-default HADOOP_HOME $out/\
--run "test -d /etc/hadoop-conf && export HADOOP_CONF_DIR=\''${HADOOP_CONF_DIR-'/etc/hadoop-conf/'}"\
--set-default HADOOP_CONF_DIR $out/etc/hadoop/\
--prefix PATH : "${makeBinPath [ bash coreutils which]}"\
--prefix JAVA_LIBRARY_PATH : "${makeLibraryPath finalAttrs.buildInputs}"
--prefix PATH : "${lib.makeBinPath [ bash coreutils which]}"\
--prefix JAVA_LIBRARY_PATH : "${lib.makeLibraryPath finalAttrs.buildInputs}"
done
'' + (optionalString sparkSupport ''
'' + (lib.optionalString sparkSupport ''
# Add the spark shuffle service jar to YARN
cp ${spark.src}/yarn/spark-${spark.version}-yarn-shuffle.jar $out/share/hadoop/yarn/
'');

passthru = { inherit tests; };

meta = recursiveUpdate {
meta = with lib; recursiveUpdate {
homepage = "https://hadoop.apache.org/";
description = "Framework for distributed processing of large data sets across clusters of computers";
license = licenses.asl20;
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/office/tryton/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
, wrapGAppsHook3
}:

with lib;

python3Packages.buildPythonApplication rec {
pname = "tryton";
version = "7.2.4";
Expand Down Expand Up @@ -61,7 +59,7 @@ python3Packages.buildPythonApplication rec {

doCheck = false;

meta = {
meta = with lib; {
description = "Client of the Tryton application platform";
mainProgram = "tryton";
longDescription = ''
Expand Down
10 changes: 4 additions & 6 deletions pkgs/applications/science/chemistry/marvin/default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{ lib, stdenv, fetchurl, dpkg, makeWrapper, coreutils, gawk, gnugrep, gnused, openjdk17 }:

with lib;

stdenv.mkDerivation rec {
pname = "marvin";
version = "23.17.0";

src = fetchurl {
name = "marvin-${version}.deb";
url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${versions.majorMinor version}.deb";
url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${lib.versions.majorMinor version}.deb";
hash = "sha256-zE/9EaOsNJwzE4Doasm9N8QG4t7wDOxqpV/Nhc4p7Ws=";
};

Expand All @@ -22,7 +20,7 @@ stdenv.mkDerivation rec {
wrapBin() {
makeWrapper $1 $out/bin/$(basename $1) \
--set INSTALL4J_JAVA_HOME "${openjdk17}" \
--prefix PATH : ${makeBinPath [ coreutils gawk gnugrep gnused ]}
--prefix PATH : ${lib.makeBinPath [ coreutils gawk gnugrep gnused ]}
}
cp -r opt $out
mkdir -p $out/bin $out/share/pixmaps $out/share/applications
Expand All @@ -33,12 +31,12 @@ stdenv.mkDerivation rec {
for name in cxcalc cxtrain evaluate molconvert mview msketch; do
wrapBin $out/opt/chemaxon/marvinsuite/bin/$name
done
${concatStrings (map (name: ''
${lib.concatStrings (map (name: ''
substitute ${./. + "/${name}.desktop"} $out/share/applications/${name}.desktop --subst-var out
'') [ "LicenseManager" "MarvinSketch" "MarvinView" ])}
'';

meta = {
meta = with lib; {
description = "Chemical modelling, analysis and structure drawing program";
homepage = "https://chemaxon.com/products/marvin";
maintainers = with maintainers; [ fusion809 ];
Expand Down
3 changes: 1 addition & 2 deletions pkgs/applications/science/electronics/fped/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
, pkg-config
}:

with lib;
stdenv.mkDerivation {
pname = "fped";
version = "unstable-2017-05-11";
Expand Down Expand Up @@ -39,7 +38,7 @@ stdenv.mkDerivation {
gtk2
];

meta = {
meta = with lib; {
description = "Editor that allows the interactive creation of footprints electronic components";
mainProgram = "fped";
homepage = "http://projects.qi-hardware.com/index.php/p/fped/";
Expand Down
Loading