chore: don't use channels for testing (#3)

This commit is contained in:
seth 2023-07-20 23:38:26 -04:00 committed by GitHub
parent 3b6f7992de
commit ec939ca6ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 10 deletions

View file

@ -38,4 +38,4 @@ jobs:
token: ${{ secrets.ATTIC_TOKEN }}
- name: Build Nix Package
run: nix build -f test.nix -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz --show-trace
run: nix build --impure --show-trace -L .#test

View file

@ -1,5 +1,5 @@
{
description = "";
description = "Github Action for caching Nix derivations with attic";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
@ -26,6 +26,16 @@
};
});
formatter = forEachSystem (p: p.nixpkgs-fmt);
formatter = forEachSystem (p: p.alejandra);
packages = forEachSystem (p: let
time = toString builtins.currentTime;
test = p.runCommand "test-${time}" {} ''
echo ${time} > $out
'';
in {
inherit test;
default = test;
});
};
}

View file

@ -1,7 +0,0 @@
let
pkgs = import <nixpkgs> { };
time = with builtins; toString currentTime;
in
pkgs.runCommand "${time}-test" { } ''
echo "${time}" > $out
''