Files
nixpkgs/pkgs/by-name/cr/crystal2nix/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

48 lines
1.0 KiB
Nix

{
lib,
fetchFromGitHub,
crystal,
makeBinaryWrapper,
nix-prefetch-git,
}:
crystal.buildCrystalPackage rec {
pname = "crystal2nix";
version = "0.3.1";
src = fetchFromGitHub {
owner = "nix-community";
repo = "crystal2nix";
rev = "v${version}";
hash = "sha256-O8X2kTzl3LYMT97tVqbIZXDcFq24ZTfvd4yeMUhmBFs=";
};
format = "shards";
shardsFile = ./shards.nix;
nativeBuildInputs = [ makeBinaryWrapper ];
postInstall = ''
mkdir -p $out/libexec
mv $out/bin/${meta.mainProgram} $out/libexec
makeWrapper $out/libexec/${meta.mainProgram} $out/bin/${meta.mainProgram} \
--prefix PATH : ${lib.makeBinPath [ nix-prefetch-git ]}
'';
# temporarily off. We need the checks to execute the wrapped binary
doCheck = false;
doInstallCheck = true;
meta = with lib; {
description = "Utility to convert Crystal's shard.lock files to a Nix file";
mainProgram = "crystal2nix";
license = licenses.mit;
maintainers = with maintainers; [
manveru
peterhoeg
];
};
}