nixpkgs/pkgs/by-name/pi/pixi/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.9 KiB
Nix
Raw Normal View History

2024-01-14 02:58:49 +00:00
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
2024-03-21 05:42:04 +00:00
, libgit2
2024-01-14 02:58:49 +00:00
, openssl
, installShellFiles
, darwin
, testers
, pixi
}:
rustPlatform.buildRustPackage rec {
pname = "pixi";
2024-10-18 03:07:11 +01:00
version = "0.34.0";
2024-01-14 02:58:49 +00:00
src = fetchFromGitHub {
owner = "prefix-dev";
repo = "pixi";
rev = "v${version}";
2024-10-18 03:07:11 +01:00
hash = "sha256-pXJna0WuosQ21u+ImIc70OaG63xVODLaWFkuYqxUc/Y=";
2024-01-14 02:58:49 +00:00
};
2024-03-21 05:42:04 +00:00
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
2024-08-25 03:39:35 +01:00
"async_zip-0.0.17" = "sha256-3k9rc4yHWhqsCUJ17K55F8aQoCKdVamrWAn6IDWo3Ss=";
"cache-key-0.0.1" = "sha256-JEGcX4dT/cVLb07n2Y0nai17jW0tXpV18qaYVnoEpew=";
"pubgrub-0.2.1" = "sha256-pU+F6hwqy+r6tz5OBoB6gU0+vdH6F3ikUaPrcvYRX2c=";
"reqwest-middleware-0.3.3" = "sha256-csQN7jZTifliSTsOm6YrjPVgsXBOfelY7LkHD1HkNGQ=";
"tl-0.7.8" = "sha256-F06zVeSZA4adT6AzLzz1i9uxpI1b8P1h+05fFfjm3GQ=";
2024-03-21 05:42:04 +00:00
};
};
2024-01-14 02:58:49 +00:00
nativeBuildInputs = [
pkg-config
installShellFiles
];
buildInputs = [
2024-03-21 05:42:04 +00:00
libgit2
2024-01-14 02:58:49 +00:00
openssl
2024-03-21 05:42:04 +00:00
] ++ lib.optionals stdenv.hostPlatform.isDarwin (
2024-01-14 02:58:49 +00:00
with darwin.apple_sdk_11_0.frameworks; [ CoreFoundation IOKit SystemConfiguration Security ]
);
2024-03-21 05:42:04 +00:00
env = {
LIBGIT2_NO_VENDOR = 1;
OPENSSL_NO_VENDOR = 1;
};
2024-08-25 03:39:35 +01:00
# As the version is updated, the number of failed tests continues to grow.
doCheck = false;
2024-01-14 02:58:49 +00:00
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
2024-03-02 14:23:35 +00:00
installShellCompletion --cmd pixi \
2024-01-14 02:58:49 +00:00
--bash <($out/bin/pixi completion --shell bash) \
--fish <($out/bin/pixi completion --shell fish) \
--zsh <($out/bin/pixi completion --shell zsh)
'';
passthru.tests.version = testers.testVersion {
package = pixi;
};
meta = with lib; {
description = "Package management made easy";
homepage = "https://pixi.sh/";
license = licenses.bsd3;
2024-06-05 12:00:53 +01:00
maintainers = with maintainers; [ aaronjheng edmundmiller ];
2024-01-14 02:58:49 +00:00
mainProgram = "pixi";
};
}