various: refactor package definitions (#443475)
This commit is contained in:
@@ -44,7 +44,7 @@ stdenv.mkDerivation {
|
||||
if (builtins.elem system platforms) then
|
||||
sources.${system}
|
||||
else
|
||||
throw "Source for ${pname} is not available for ${system}";
|
||||
throw "Source for 1password-cli is not available for ${system}";
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
@@ -63,23 +63,23 @@ stdenv.mkDerivation {
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -D ${mainProgram} $out/bin/${mainProgram}
|
||||
install -D op $out/bin/op
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
HOME=$TMPDIR
|
||||
installShellCompletion --cmd ${mainProgram} \
|
||||
--bash <($out/bin/${mainProgram} completion bash) \
|
||||
--fish <($out/bin/${mainProgram} completion fish) \
|
||||
--zsh <($out/bin/${mainProgram} completion zsh)
|
||||
installShellCompletion --cmd op \
|
||||
--bash <($out/bin/op completion bash) \
|
||||
--fish <($out/bin/op completion fish) \
|
||||
--zsh <($out/bin/op completion zsh)
|
||||
'';
|
||||
|
||||
dontStrip = stdenv.hostPlatform.isDarwin;
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
versionCheckProgram = "${builtins.placeholder "out"}/bin/${mainProgram}";
|
||||
versionCheckProgram = "${builtins.placeholder "out"}/bin/op";
|
||||
versionCheckProgramArg = "--version";
|
||||
|
||||
passthru = {
|
||||
|
||||
@@ -109,9 +109,9 @@ stdenv.mkDerivation {
|
||||
cp -a * $out/share/1password
|
||||
|
||||
# Desktop file
|
||||
install -Dt $out/share/applications resources/${pname}.desktop
|
||||
substituteInPlace $out/share/applications/${pname}.desktop \
|
||||
--replace-fail 'Exec=/opt/1Password/${pname}' 'Exec=${pname}'
|
||||
install -Dt $out/share/applications resources/1password.desktop
|
||||
substituteInPlace $out/share/applications/1password.desktop \
|
||||
--replace-fail 'Exec=/opt/1Password/1password' 'Exec=1password'
|
||||
|
||||
''
|
||||
+ (lib.optionalString (polkitPolicyOwners != [ ]) ''
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
llvmPackages,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation {
|
||||
pname = "aaphoto";
|
||||
version = "0.45";
|
||||
|
||||
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 NEWS README REMARKS TODO -t $out/share/doc/${pname}
|
||||
install -Dm644 NEWS README REMARKS TODO -t $out/share/doc/aaphoto
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
fetchurl,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "acpi";
|
||||
version = "1.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/acpiclient/${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-5kxuALU815dCfqMqFgUTQlsD7U8HdzP3Hx8J/zQPIws=";
|
||||
url = "mirror://sourceforge/acpiclient/${finalAttrs.version}/acpi-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-5kxuALU815dCfqMqFgUTQlsD7U8HdzP3Hx8J/zQPIws=";
|
||||
};
|
||||
|
||||
meta = {
|
||||
@@ -27,4 +27,4 @@ stdenv.mkDerivation rec {
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -16,7 +16,7 @@ buildGoModule rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "maximbaz";
|
||||
repo = "yubikey-touch-detector";
|
||||
rev = version;
|
||||
tag = version;
|
||||
hash = "sha256-aHR/y8rAKS+dMvRdB3oAmOiI7hTA6qlF4Z05OjwYOO4=";
|
||||
};
|
||||
vendorHash = "sha256-oHEcpu3QvcVC/YCtGtP7nNT9++BSU8BPT5pf8NdLrOo=";
|
||||
@@ -33,9 +33,9 @@ buildGoModule rec {
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm444 -t $out/share/doc/${pname} *.{md,example}
|
||||
install -Dm444 -t $out/share/doc/yubikey-touch-detector *.{md,example}
|
||||
|
||||
install -Dm444 -t $out/share/licenses/${pname} LICENSE
|
||||
install -Dm444 -t $out/share/licenses/yubikey-touch-detector LICENSE
|
||||
|
||||
install -Dm444 -t $out/share/icons/hicolor/128x128/apps yubikey-touch-detector.png
|
||||
|
||||
@@ -48,12 +48,12 @@ buildGoModule rec {
|
||||
installManPage yubikey-touch-detector.1
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Tool to detect when your YubiKey is waiting for a touch";
|
||||
homepage = "https://github.com/maximbaz/yubikey-touch-detector";
|
||||
maintainers = with maintainers; [ sumnerevans ];
|
||||
license = licenses.isc;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with lib.maintainers; [ sumnerevans ];
|
||||
license = lib.licenses.isc;
|
||||
platforms = lib.platforms.linux;
|
||||
mainProgram = "yubikey-touch-detector";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
jre,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "yuicompressor";
|
||||
version = "2.4.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/yui/yuicompressor/releases/download/v${version}/${pname}-${version}.jar";
|
||||
url = "https://github.com/yui/yuicompressor/releases/download/v${finalAttrs.version}/yuicompressor-${finalAttrs.version}.jar";
|
||||
sha256 = "1qjxlak9hbl9zd3dl5ks0w4zx5z64wjsbk7ic73r1r45fasisdrh";
|
||||
};
|
||||
|
||||
@@ -25,13 +25,13 @@ stdenv.mkDerivation rec {
|
||||
"-cp $out/lib/yuicompressor.jar com.yahoo.platform.yui.compressor.YUICompressor"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "JavaScript and CSS minifier";
|
||||
mainProgram = "yuicompressor";
|
||||
homepage = "http://yui.github.io/yuicompressor/";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ jwiegley ];
|
||||
platforms = platforms.all;
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ jwiegley ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -37,7 +37,7 @@ let
|
||||
};
|
||||
|
||||
rubyEnv = bundlerEnv {
|
||||
name = "${pname}-gems-${version}";
|
||||
name = "zammad-gems-${version}";
|
||||
inherit version;
|
||||
|
||||
# Which ruby version to select:
|
||||
@@ -127,15 +127,15 @@ stdenvNoCC.mkDerivation {
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Web-based, open source user support/ticketing solution";
|
||||
homepage = "https://zammad.org";
|
||||
license = licenses.agpl3Plus;
|
||||
license = lib.licenses.agpl3Plus;
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
maintainers = with maintainers; [
|
||||
maintainers = with lib.maintainers; [
|
||||
taeer
|
||||
netali
|
||||
];
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
runtimeShell,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "zap";
|
||||
version = "2.16.1";
|
||||
src = fetchurl {
|
||||
url = "https://github.com/zaproxy/zaproxy/releases/download/v${version}/ZAP_${version}_Linux.tar.gz";
|
||||
sha256 = "sha256-Wy64MZsIUSGm6K1Q1p1n2++MhnFm9xqTe/yIjSR6KsE=";
|
||||
url = "https://github.com/zaproxy/zaproxy/releases/download/v${finalAttrs.version}/ZAP_${finalAttrs.version}_Linux.tar.gz";
|
||||
hash = "sha256-Wy64MZsIUSGm6K1Q1p1n2++MhnFm9xqTe/yIjSR6KsE=";
|
||||
};
|
||||
|
||||
desktopItems = [
|
||||
@@ -44,35 +44,35 @@ stdenv.mkDerivation rec {
|
||||
|
||||
mkdir -p $out/{bin,share}
|
||||
|
||||
cp -pR . "$out/share/${pname}/"
|
||||
cp -pR . "$out/share/zap/"
|
||||
|
||||
cat >> "$out/bin/${pname}" << EOF
|
||||
cat >> "$out/bin/zap" << EOF
|
||||
#!${runtimeShell}
|
||||
export PATH="${lib.makeBinPath [ jre ]}:\$PATH"
|
||||
export JAVA_HOME='${jre}'
|
||||
if ! [ -f "\$HOME/.ZAP/config.xml" ];then
|
||||
mkdir -p "\$HOME/.ZAP"
|
||||
head -n 2 $out/share/${pname}/xml/config.xml > "\$HOME/.ZAP/config.xml"
|
||||
echo "<version>${version_tag}</version>" >> "\$HOME/.ZAP/config.xml"
|
||||
tail -n +3 $out/share/${pname}/xml/config.xml >> "\$HOME/.ZAP/config.xml"
|
||||
head -n 2 $out/share/zap/xml/config.xml > "\$HOME/.ZAP/config.xml"
|
||||
echo "<version>${finalAttrs.version_tag}</version>" >> "\$HOME/.ZAP/config.xml"
|
||||
tail -n +3 $out/share/zap/xml/config.xml >> "\$HOME/.ZAP/config.xml"
|
||||
fi
|
||||
exec "$out/share/${pname}/zap.sh" "\$@"
|
||||
exec "$out/share/zap/zap.sh" "\$@"
|
||||
EOF
|
||||
|
||||
chmod u+x "$out/bin/${pname}"
|
||||
chmod u+x "$out/bin/zap"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
homepage = "https://www.zaproxy.org/";
|
||||
description = "Java application for web penetration testing";
|
||||
maintainers = with maintainers; [
|
||||
maintainers = with lib.maintainers; [
|
||||
mog
|
||||
rafael
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.asl20;
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.asl20;
|
||||
mainProgram = "zap";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
vala,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "zile";
|
||||
version = "2.6.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/zile/${pname}-${version}.tar.gz";
|
||||
url = "mirror://gnu/zile/zile-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-1dRLhctJBkPQcH4aIYbzoymYwvbquqlIFHm2XK7uV8A=";
|
||||
};
|
||||
|
||||
@@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.gnu.org/software/zile/";
|
||||
changelog = "https://git.savannah.gnu.org/cgit/zile.git/plain/NEWS?h=v${version}";
|
||||
changelog = "https://git.savannah.gnu.org/cgit/zile.git/plain/NEWS?h=v${finalAttrs.version}";
|
||||
description = "Implements Lua Editors";
|
||||
longDescription = ''
|
||||
GNU Zile is a text editor development kit, so that you can (relatively)
|
||||
@@ -82,4 +82,4 @@ stdenv.mkDerivation rec {
|
||||
platforms = lib.platforms.unix;
|
||||
mainProgram = "zile";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
zita-resampler,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "zita-ajbridge";
|
||||
version = "0.8.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
|
||||
sha256 = "0g5v0l0zmqh049mhv62n8s5bpm0yrlby7mkxxhs5qwadp8v4w9mw";
|
||||
url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/zita-ajbridge-${finalAttrs.version}.tar.bz2";
|
||||
hash = "sha256-vCZONrpNcVw07H3W4xfNHtS7ikZWmA1rIgDi+gEFuzw=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
@@ -35,11 +35,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Connect additional ALSA devices to JACK";
|
||||
homepage = "http://kokkinizita.linuxaudio.org/linuxaudio/index.html";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ orivej ];
|
||||
platforms = platforms.linux;
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ orivej ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -15,7 +15,7 @@ let
|
||||
pname = "Mojo-Log-Clearable";
|
||||
version = "1.001";
|
||||
src = fetchurl {
|
||||
url = "mirror://cpan/authors/id/D/DB/DBOOK/${pname}-${version}.tar.gz";
|
||||
url = "mirror://cpan/authors/id/D/DB/DBOOK/Mojo-Log-Clearable-${version}.tar.gz";
|
||||
hash = "sha256-guBqKdWemc4mC/xp77Wd7qeV2iRqY4wrQ5NRsHtsCnI=";
|
||||
};
|
||||
buildInputs = with perl.pkgs; [ ModuleBuildTiny ];
|
||||
@@ -70,14 +70,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
$out/bin/znapzend --version
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "High performance open source ZFS backup with mbuffer and ssh support";
|
||||
homepage = "https://www.znapzend.org";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [
|
||||
otwieracz
|
||||
ma27
|
||||
];
|
||||
platforms = platforms.all;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
})
|
||||
|
||||
@@ -21,7 +21,7 @@ let
|
||||
version = "2011-09-06";
|
||||
src = fetchzip {
|
||||
url = "mirror://sourceforge/zod/linux_releases/zod_linux-${version}.tar.gz";
|
||||
sha256 = "017v96aflrv07g8j8zk9mq8f8rqxl5228rjff5blq8dxpsv1sx7h";
|
||||
hash = "sha256-8HQdtr69IUxXcU5mJEShHWfkEK5pfiTRO2Bn6pRJ+wQ=";
|
||||
};
|
||||
postPatch = ''
|
||||
sed '1i#include <ctime>' -i zod_src/common.cpp # gcc12
|
||||
@@ -50,7 +50,7 @@ let
|
||||
hardeningDisable
|
||||
NIX_LDFLAGS
|
||||
;
|
||||
pname = "${pname}-engine";
|
||||
pname = "zod-engine-engine";
|
||||
enableParallelBuilding = true;
|
||||
preBuild = "cd zod_src";
|
||||
installPhase = ''
|
||||
@@ -69,7 +69,7 @@ let
|
||||
hardeningDisable
|
||||
NIX_LDFLAGS
|
||||
;
|
||||
pname = "${pname}-map_editor";
|
||||
pname = "zod-engine-map_editor";
|
||||
enableParallelBuilding = true;
|
||||
preBuild = "cd zod_src";
|
||||
makeFlags = [ "map_editor" ];
|
||||
@@ -88,7 +88,7 @@ let
|
||||
zod_engine
|
||||
zod_map_editor
|
||||
;
|
||||
pname = "${pname}-launcher";
|
||||
pname = "zod-engine-launcher";
|
||||
# This is necessary because the zod_launcher has terrible fixed-width window
|
||||
# the Idea is to apply the scalingFactor to all positions and sizes and I tested 1,2,3 and 4
|
||||
# 2,3,4 look acceptable on my 4k monitor and 1 is unreadable.
|
||||
@@ -109,7 +109,7 @@ let
|
||||
install -m755 zod_launcher $out/bin
|
||||
'';
|
||||
};
|
||||
zod_assets = runCommandLocal "${pname}-assets" { } ''
|
||||
zod_assets = runCommandLocal "zod-engine-assets" { } ''
|
||||
mkdir -p $out/usr/lib/commander-zod{,blank_maps}
|
||||
cp -r ${src}/assets $out/usr/lib/commander-zod/assets
|
||||
for i in ${src}/*.map ${src}/*.txt; do
|
||||
@@ -128,11 +128,11 @@ symlinkJoin {
|
||||
zod_map_editor
|
||||
zod_assets
|
||||
];
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Multiplayer remake of ZED";
|
||||
homepage = "https://zod.sourceforge.net/";
|
||||
maintainers = with maintainers; [ zeri ];
|
||||
license = licenses.gpl3Plus; # Says the website
|
||||
platforms = platforms.linux;
|
||||
maintainers = with lib.maintainers; [ zeri ];
|
||||
license = lib.licenses.gpl3Plus; # Says the website
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,12 +13,12 @@ let
|
||||
# https://zookeeper.apache.org/doc/r3.9.2/zookeeperAdmin.html#sc_requiredSoftware
|
||||
jre = jdk11_headless;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "zookeeper";
|
||||
version = "3.9.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://apache/zookeeper/${pname}-${version}/apache-${pname}-${version}-bin.tar.gz";
|
||||
url = "mirror://apache/zookeeper/zookeeper-${finalAttrs.version}/apache-zookeeper-${finalAttrs.version}-bin.tar.gz";
|
||||
hash = "sha512-1E2HDBaRZi778ai68YWckBuCDcX/Fjs26BvrJ7b7880xtfHwdWl+2q9tPnpMsMyS+STc/2SylO8T1TVYm9rxQw==";
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
|
||||
meta = {
|
||||
homepage = "https://zookeeper.apache.org";
|
||||
description = "Apache Zookeeper";
|
||||
changelog = "https://zookeeper.apache.org/doc/r${version}/releasenotes.html";
|
||||
changelog = "https://zookeeper.apache.org/doc/r${finalAttrs.version}/releasenotes.html";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
nathan-gs
|
||||
@@ -62,4 +62,4 @@ stdenv.mkDerivation rec {
|
||||
platforms = lib.platforms.unix;
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user