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-04-22 08:16:54 +00:00
|
|
|
version = "0.20.0";
|
2024-01-14 02:58:49 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "prefix-dev";
|
|
|
|
repo = "pixi";
|
|
|
|
rev = "v${version}";
|
2024-04-22 08:16:54 +00:00
|
|
|
hash = "sha256-7ah5u3E9nodo/0YSuaswRY07zz8EQgvttbVKjw/USCc=";
|
2024-01-14 02:58:49 +00:00
|
|
|
};
|
|
|
|
|
2024-03-21 05:42:04 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-04-22 08:16:54 +00:00
|
|
|
"async_zip-0.0.17" = "sha256-Q5fMDJrQtob54CTII3+SXHeozy5S5s3iLOzntevdGOs=";
|
|
|
|
"cache-key-0.0.1" = "sha256-qGFjI/LNf2p11BOgacYHU0hoXvCEjjnyAcAAIcD7YTo=";
|
|
|
|
"pubgrub-0.2.1" = "sha256-sqC7R2mtqymYFULDW0wSbM/MKCZc8rP7Yy/gaQpjYEI=";
|
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.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-03-02 14:23:35 +00:00
|
|
|
# There are some CI failures with Rattler. Tests on Aarch64 has been skipped.
|
|
|
|
# See https://github.com/prefix-dev/pixi/pull/241.
|
|
|
|
doCheck = !stdenv.isAarch64;
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME="$(mktemp -d)"
|
|
|
|
'';
|
2024-01-14 02:58:49 +00:00
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# Skip tests requiring network
|
|
|
|
"--skip=add_channel"
|
|
|
|
"--skip=add_functionality"
|
|
|
|
"--skip=add_functionality_os"
|
|
|
|
"--skip=add_functionality_union"
|
|
|
|
"--skip=add_pypi_functionality"
|
|
|
|
"--skip=test_alias"
|
|
|
|
"--skip=test_cwd"
|
2024-04-10 12:24:51 +00:00
|
|
|
"--skip=test_compressed_mapping_catch_missing_package"
|
2024-01-14 02:58:49 +00:00
|
|
|
"--skip=test_incremental_lock_file"
|
2024-04-10 12:24:51 +00:00
|
|
|
"--skip=test_purl_are_added_for_pypi"
|
2024-04-22 08:16:54 +00:00
|
|
|
|
|
|
|
"--skip=test_task_with_env" # `/usr/bin/env` required
|
2024-01-14 02:58:49 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
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-01-27 19:56:25 +00:00
|
|
|
maintainers = with lib.maintainers; [ aaronjheng edmundmiller ];
|
2024-01-14 02:58:49 +00:00
|
|
|
mainProgram = "pixi";
|
|
|
|
};
|
|
|
|
}
|