This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/scripts/clean-s3-cache.nix

23 lines
555 B
Nix
Raw Normal View History

2022-06-11 14:04:50 +00:00
{
pkgs,
inputs,
}: rec {
2022-06-11 12:57:31 +00:00
clean-s3-cache-env = pkgs.python3.buildEnv.override {
2022-06-11 14:04:50 +00:00
extraLibs = with pkgs.python3Packages; [boto3];
2022-06-11 12:55:50 +00:00
};
2022-06-11 12:57:31 +00:00
clean-s3-cache = pkgs.stdenvNoCC.mkDerivation {
2022-06-11 12:55:50 +00:00
pname = "clean-s3-cache";
version = inputs.clean-s3-cache.lastModifiedDate;
srcs = inputs.clean-s3-cache;
python = clean-s3-cache-env;
2022-06-11 12:55:50 +00:00
buildPhase = ''
substituteAllInPlace clean-s3-cache.py
2022-06-11 12:55:50 +00:00
'';
installPhase = ''
mkdir -p $out/bin
cp clean-s3-cache.py $out/bin
chmod +x $out/bin/clean-s3-cache.py
'';
};
}