csmith: modernize package derivations, fix broken download link

This commit is contained in:
Guy Chronister
2026-02-15 14:22:00 -06:00
parent 2ef2f7e4a2
commit 8a46bb9495

View File

@@ -9,7 +9,7 @@
perlPackages,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "csmith";
version = "2.3.0-unstable-2026-03-01";
@@ -40,13 +40,13 @@ stdenv.mkDerivation rec {
postInstall = ''
substituteInPlace $out/bin/compiler_test.pl \
--replace '$CSMITH_HOME/runtime' $out/include/${pname}-${version} \
--replace ' ''${CSMITH_HOME}/runtime' " $out/include/${pname}-${version}" \
--replace '$CSMITH_HOME/src/csmith' $out/bin/csmith
--replace-fail '$CSMITH_HOME/runtime' $out/include/csmith-${finalAttrs.version} \
--replace-fail ' ''${CSMITH_HOME}/runtime' " $out/include/csmith-${finalAttrs.version}" \
--replace-fail '$CSMITH_HOME/src/csmith' $out/bin/csmith
substituteInPlace $out/bin/launchn.pl \
--replace '../compiler_test.pl' $out/bin/compiler_test.pl \
--replace '../$CONFIG_FILE' '$CONFIG_FILE'
--replace-fail '../compiler_test.pl' $out/bin/compiler_test.pl \
--replace-fail '../$CONFIG_FILE' '$CONFIG_FILE'
wrapProgram $out/bin/launchn.pl \
--prefix PERL5LIB : "$PERL5LIB"
@@ -72,4 +72,4 @@ stdenv.mkDerivation rec {
maintainers = [ ];
platforms = lib.platforms.all;
};
}
})