Skip to content
26 changes: 14 additions & 12 deletions pkgs/by-name/ca/cadical/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
version ? "2.2.0",
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "cadical";
inherit version;

src = fetchFromGitHub {
owner = "arminbiere";
repo = "cadical";
rev = "rel-${version}";
rev = "rel-${finalAttrs.version}";
hash =
{
"2.2.0" = "sha256-6O0lz0YJzk1eJblQ0/f9PnSYqD8WoendIZioQiGUpCg=";
"2.1.3" = "sha256-W3kO+6nVzkmJXyHJU+NZWP0oatK3gon4EWF1/03rgL4=";
"2.0.0" = "sha256-qoeEM9SdpuFuBPeQlCzuhPLcJ+bMQkTUTGiT8QdU8rc=";
}
.${version};
.${finalAttrs.version};
};

outputs = [
Expand All @@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
pkgconfigItems = [
(makePkgconfigItem {
name = "cadical";
inherit version;
inherit (finalAttrs) version;
cflags = [ "-I\${includedir}" ];
libs = [
"-L\${libdir}"
Expand All @@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
includedir = "@includedir@";
libdir = "@libdir@";
};
inherit (meta) description;
inherit (finalAttrs.meta) description;
})
];

Expand All @@ -63,10 +63,12 @@ stdenv.mkDerivation rec {
substituteInPlace makefile.in --replace-fail "ar rc" '$(AR) rc'
''
# Racy/flaky tests that sometimes spontaneously combust on darwin.
+ lib.optionalString (stdenv.hostPlatform.isDarwin && (lib.versionAtLeast version "2.1.1")) ''
substituteInPlace test/api/run.sh --replace-fail 'run parcompwrite' ""
substituteInPlace test/api/run.sh --replace-fail 'run example_tracer' ""
'';
+
lib.optionalString (stdenv.hostPlatform.isDarwin && (lib.versionAtLeast finalAttrs.version "2.1.1"))
''
substituteInPlace test/api/run.sh --replace-fail 'run parcompwrite' ""
substituteInPlace test/api/run.sh --replace-fail 'run example_tracer' ""
'';

# the configure script is not generated by autotools and does not accept the
# arguments that the default configurePhase passes like --prefix and --libdir
Expand All @@ -88,8 +90,8 @@ stdenv.mkDerivation rec {
install -Dm0644 src/cadical.hpp "$dev/include/cadical/cadical.hpp"
install -Dm0644 src/tracer.hpp "$dev/include/cadical/tracer.hpp"
install -Dm0644 build/libcadical.a "$lib/lib/libcadical.a"
mkdir -p "$out/share/doc/${pname}/"
install -Dm0755 {LICEN?E,README*,VERSION} "$out/share/doc/${pname}/"
mkdir -p "$out/share/doc/${finalAttrs.pname}/"
install -Dm0755 {LICEN?E,README*,VERSION} "$out/share/doc/${finalAttrs.pname}/"

runHook postInstall
'';
Expand All @@ -101,4 +103,4 @@ stdenv.mkDerivation rec {
license = lib.licenses.mit;
homepage = "https://fmv.jku.at/cadical/";
};
}
})
8 changes: 4 additions & 4 deletions pkgs/by-name/ca/cargo-machete/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
fetchFromGitHub,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cargo-machete";
version = "0.9.1";

src = fetchFromGitHub {
owner = "bnjbvr";
repo = "cargo-machete";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-4tzffZeHdhAq6/K1BGkThqT+CBa3rUw+kR7aLwnqZjc=";
};

Expand All @@ -24,10 +24,10 @@ rustPlatform.buildRustPackage rec {
description = "Cargo tool that detects unused dependencies in Rust projects";
mainProgram = "cargo-machete";
homepage = "https://github.com/bnjbvr/cargo-machete";
changelog = "https://github.com/bnjbvr/cargo-machete/blob/${src.rev}/CHANGELOG.md";
changelog = "https://github.com/bnjbvr/cargo-machete/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
matthiasbeyer
];
};
}
})
6 changes: 3 additions & 3 deletions pkgs/by-name/ca/cargo-nextest/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
nix-update-script,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cargo-nextest";
version = "0.9.114";

src = fetchFromGitHub {
owner = "nextest-rs";
repo = "nextest";
rev = "cargo-nextest-${version}";
tag = "cargo-nextest-${finalAttrs.version}";
hash = "sha256-0l8+YKIdKhvwdEbvSgYcX1deq+aRZkxXUCw2zMSO4cU=";
};

Expand Down Expand Up @@ -49,4 +49,4 @@ rustPlatform.buildRustPackage rec {
matthiasbeyer
];
};
}
})
8 changes: 4 additions & 4 deletions pkgs/by-name/ca/cargo-rdme/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
fetchCrate,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cargo-rdme";
version = "1.5.0";

src = fetchCrate {
inherit pname version;
inherit (finalAttrs) pname version;
hash = "sha256-TmV6Fc5vlc4fm9w4+iuxmnonwsEbqoJ3jvpIyQOuxjg=";
};

Expand All @@ -19,8 +19,8 @@ rustPlatform.buildRustPackage rec {
description = "Cargo command to create the README.md from your crate's documentation";
mainProgram = "cargo-rdme";
homepage = "https://github.com/orium/cargo-rdme";
changelog = "https://github.com/orium/cargo-rdme/blob/v${version}/release-notes.md";
changelog = "https://github.com/orium/cargo-rdme/blob/v${finalAttrs.version}/release-notes.md";
license = with lib.licenses; [ mpl20 ];
maintainers = with lib.maintainers; [ GoldsteinE ];
};
}
})
10 changes: 5 additions & 5 deletions pkgs/by-name/ca/cargo-semver-checks/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
nix-update-script,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cargo-semver-checks";
version = "0.45.0";

src = fetchFromGitHub {
owner = "obi1kenobi";
repo = "cargo-semver-checks";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-sDx449IXsFUeNL7rXbGC+HUshwqcbpjvGwl0WIJZmwo=";
};

Expand Down Expand Up @@ -48,7 +48,7 @@ rustPlatform.buildRustPackage rec {
substituteInPlace test_outputs/integration_snapshots__bugreport.snap \
--replace-fail \
'cargo-semver-checks [VERSION] ([HASH])' \
'cargo-semver-checks ${version}'
'cargo-semver-checks ${finalAttrs.version}'
'';

passthru = {
Expand All @@ -60,7 +60,7 @@ rustPlatform.buildRustPackage rec {
description = "Tool to scan your Rust crate for semver violations";
mainProgram = "cargo-semver-checks";
homepage = "https://github.com/obi1kenobi/cargo-semver-checks";
changelog = "https://github.com/obi1kenobi/cargo-semver-checks/releases/tag/v${version}";
changelog = "https://github.com/obi1kenobi/cargo-semver-checks/releases/tag/v${finalAttrs.version}";
license = with lib.licenses; [
mit # or
asl20
Expand All @@ -69,4 +69,4 @@ rustPlatform.buildRustPackage rec {
matthiasbeyer
];
};
}
})
8 changes: 4 additions & 4 deletions pkgs/by-name/ca/cargo-show-asm/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
callPackage,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cargo-show-asm";
version = "0.2.54";

src = fetchCrate {
inherit pname version;
inherit (finalAttrs) pname version;
hash = "sha256-AF8fFPdiSZ/odPg3Kp72+LlJ+ox0PU+dH1fhPSt61n8=";
};

Expand All @@ -40,7 +40,7 @@ rustPlatform.buildRustPackage rec {
meta = {
description = "Cargo subcommand showing the assembly, LLVM-IR and MIR generated for Rust code";
homepage = "https://github.com/pacak/cargo-show-asm";
changelog = "https://github.com/pacak/cargo-show-asm/blob/${version}/Changelog.md";
changelog = "https://github.com/pacak/cargo-show-asm/blob/${finalAttrs.version}/Changelog.md";
license = with lib.licenses; [
asl20
mit
Expand All @@ -51,4 +51,4 @@ rustPlatform.buildRustPackage rec {
];
mainProgram = "cargo-asm";
};
}
})
8 changes: 4 additions & 4 deletions pkgs/by-name/ca/cargo-spellcheck/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
fetchFromGitHub,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cargo-spellcheck";
version = "0.15.5";

src = fetchFromGitHub {
owner = "drahnr";
repo = "cargo-spellcheck";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-saRr1xEBefLoCgCxU/pyQOmmt/di+DOQHMoVc4LgRm0=";
};

Expand All @@ -31,7 +31,7 @@ rustPlatform.buildRustPackage rec {
description = "Checks rust documentation for spelling and grammar mistakes";
mainProgram = "cargo-spellcheck";
homepage = "https://github.com/drahnr/cargo-spellcheck";
changelog = "https://github.com/drahnr/cargo-spellcheck/blob/v${version}/CHANGELOG.md";
changelog = "https://github.com/drahnr/cargo-spellcheck/blob/v${finalAttrs.version}/CHANGELOG.md";
license = with lib.licenses; [
asl20 # or
mit
Expand All @@ -41,4 +41,4 @@ rustPlatform.buildRustPackage rec {
matthiasbeyer
];
};
}
})
6 changes: 3 additions & 3 deletions pkgs/by-name/ca/cargo-udeps/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
libiconv,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cargo-udeps";
version = "0.1.60";

src = fetchFromGitHub {
owner = "est31";
repo = "cargo-udeps";
rev = "v${version}";
rev = "v${finalAttrs.version}";
sha256 = "sha256-NW9yjFUV+o7vv5bYD8nxSWHOXOBnDEk36xze90wYuNg=";
};

Expand Down Expand Up @@ -44,4 +44,4 @@ rustPlatform.buildRustPackage rec {
];
mainProgram = "cargo-udeps";
};
}
})
6 changes: 3 additions & 3 deletions pkgs/by-name/ca/cargo-valgrind/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
makeWrapper,
valgrind,
}:
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "cargo-valgrind";
version = "2.4.0";

src = fetchFromGitHub {
owner = "jfrimmel";
repo = "cargo-valgrind";
tag = version;
tag = finalAttrs.version;
sha256 = "sha256-sVW3zNe0a9iQQ0vRWJofqG4gwUJ/w0U4ugVyMNtWX98=";
};

Expand Down Expand Up @@ -51,4 +51,4 @@ rustPlatform.buildRustPackage rec {
matthiasbeyer
];
};
}
})
10 changes: 5 additions & 5 deletions pkgs/by-name/ki/kissat/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ let
homepage = "https://fmv.jku.at/kissat";
};
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "kissat";
version = "4.0.4";

src = fetchFromGitHub {
owner = "arminbiere";
repo = "kissat";
rev = "rel-${version}";
rev = "rel-${finalAttrs.version}";
sha256 = "sha256-hgB1U2Pmh1hEyNA3ej3fXxxf0YjCRgtOuSddRl6s0eo=";
};

Expand Down Expand Up @@ -87,9 +87,9 @@ stdenv.mkDerivation rec {
libdir=${placeholder "lib"}/lib
includedir=\''${prefix}/include

Name: ${pname}
Name: ${finalAttrs.pname}
Description: ${meta.description}
Version: ${version}
Version: ${finalAttrs.version}
Libs: -L\''${libdir} -lkissat
Cflags: -I\''${includedir}
EOF
Expand All @@ -98,4 +98,4 @@ stdenv.mkDerivation rec {
'';

inherit meta;
}
})
16 changes: 8 additions & 8 deletions pkgs/by-name/re/release-plz/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
openssl,
}:

rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {
pname = "release-plz";
version = "0.3.148";

src = fetchFromGitHub {
owner = "MarcoIeni";
repo = "release-plz";
rev = "release-plz-v${version}";
rev = "release-plz-v${finalAttrs.version}";
hash = "sha256-XvmgpsCxbXc+NvzKZBXmhcIM+SKCTPkQldObUuXHVus=";
};

Expand All @@ -36,16 +36,16 @@ rustPlatform.buildRustPackage rec {
doCheck = false;

postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd ${meta.mainProgram} \
--bash <($out/bin/${meta.mainProgram} generate-completions bash) \
--fish <($out/bin/${meta.mainProgram} generate-completions fish) \
--zsh <($out/bin/${meta.mainProgram} generate-completions zsh)
installShellCompletion --cmd ${finalAttrs.meta.mainProgram} \
--bash <($out/bin/${finalAttrs.meta.mainProgram} generate-completions bash) \
--fish <($out/bin/${finalAttrs.meta.mainProgram} generate-completions fish) \
--zsh <($out/bin/${finalAttrs.meta.mainProgram} generate-completions zsh)
'';

meta = {
description = "Publish Rust crates from CI with a Release PR";
homepage = "https://release-plz.ieni.dev";
changelog = "https://github.com/MarcoIeni/release-plz/blob/release-plz-v${version}/CHANGELOG.md";
changelog = "https://github.com/MarcoIeni/release-plz/blob/release-plz-v${finalAttrs.version}/CHANGELOG.md";
license = with lib.licenses; [
asl20
mit
Expand All @@ -54,4 +54,4 @@ rustPlatform.buildRustPackage rec {
mainProgram = "release-plz";
broken = stdenv.hostPlatform.isDarwin;
};
}
})
Loading
Loading