From 851323f3b4085726c9e7b1b13fc1daa1d0eff17a Mon Sep 17 00:00:00 2001 From: Bryan Richter Date: Fri, 13 Feb 2026 10:03:36 +0200 Subject: [PATCH] Add a justfile --- justfile | 24 ++++++++++++++++++++++++ package.nix | 9 ++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 0000000..860f485 --- /dev/null +++ b/justfile @@ -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 diff --git a/package.nix b/package.nix index ab7fbba..5d82b99 100644 --- a/package.nix +++ b/package.nix @@ -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 + ]; }; }