Add a justfile

This commit is contained in:
Bryan Richter 2026-02-13 10:03:36 +02:00
parent c4b2b4095e
commit 851323f3b4
No known key found for this signature in database
GPG Key ID: B202264020068BFB
2 changed files with 32 additions and 1 deletions

24
justfile Normal file
View File

@ -0,0 +1,24 @@
[parallel]
test: stackage-server-nix
stack test
nix flake check
stackage-server-nix:
cd nix && ./gen-packages.sh stackage-server
cachix-push:
# inputs
nix flake archive --json \
| jq -r '.path,(.inputs|to_entries[].value.path)' \
| cachix push stackage-infrastructure
# runtime closure
nix build --no-link --print-out-paths \
| cachix push stackage-infrastructure
# shell env
nix develop --profile dev-profile -c true
cachix push stackage-infrastructure dev-profile
run-ci:
act --artifact-server-path=$PWD/act-artifacts pull_request --job stack-test

View File

@ -41,6 +41,13 @@ in
app = hlib.justStaticExecutables hpkgs.stackage-server;
shell = hpkgs.shellFor {
packages = p: [ p.stackage-server ];
buildInputs = [ pkgs.cabal-install pkgs.haskell-language-server pkgs.ghcid pkgs.haskellPackages.yesod-bin pkgs.postgresql ];
buildInputs = [
pkgs.cabal-install
pkgs.haskell-language-server
pkgs.ghcid
pkgs.haskellPackages.yesod-bin
pkgs.postgresql
pkgs.just
];
};
}