depot/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

{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, libgit2
, openssl
, installShellFiles
, darwin
, testers
, pixi
}:
rustPlatform.buildRustPackage rec {
pname = "pixi";
version = "0.34.0";
src = fetchFromGitHub {
owner = "prefix-dev";
repo = "pixi";
rev = "v${version}";
hash = "sha256-pXJna0WuosQ21u+ImIc70OaG63xVODLaWFkuYqxUc/Y=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"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=";
};
};
nativeBuildInputs = [
pkg-config
installShellFiles
];
buildInputs = [
libgit2
openssl
] ++ lib.optionals stdenv.hostPlatform.isDarwin (
with darwin.apple_sdk_11_0.frameworks; [ CoreFoundation IOKit SystemConfiguration Security ]
);
env = {
LIBGIT2_NO_VENDOR = 1;
OPENSSL_NO_VENDOR = 1;
};
# As the version is updated, the number of failed tests continues to grow.
doCheck = false;
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd pixi \
--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;
maintainers = with maintainers; [ aaronjheng edmundmiller ];
mainProgram = "pixi";
};
}