nix-config/nixpkgs-overlay/pile.nix

26 lines
606 B
Nix
Raw Normal View History

2021-02-21 21:25:45 +01:00
{ fetchgit, rustPlatform }:
2020-04-04 00:56:53 +02:00
let
2021-02-21 21:25:45 +01:00
pile = fetchgit {
url = "https://github.com/astro/pile.git";
sha256 = "sha256-z4xNUGmP35ZBZUpgozQHANZniADfmwEoclnEwNlvAC4=";
};
2020-04-04 00:56:53 +02:00
in {
ledball = rustPlatform.buildRustPackage {
name = "ledball";
version = "0.0.0";
src = "${pile}/ledball";
cargoSha256 = "0zyfbf3gph8gqab07fmm5a7x5slapsqn8ck6isp53fsa7ljnagjy";
cargoBuildFlags = [ "--examples" ];
postInstall = ''
mkdir -p $out/bin
for f in target/*/release/examples/*; do
if [ -f $f ] && [ -x $f ]; then
cp $f $out/bin/
fi
done
'';
};
}