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 + ]; }; }