diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b7ebef..2952140 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,6 +26,8 @@ jobs: system: x86_64-linux - template: pix-ctl-full system: x86_64-linux + - template: pix-purenix + system: x86_64-linux runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/update-flake-lock.yml b/.github/workflows/update-flake-lock.yml index a1bc9b3..e628bb9 100644 --- a/.github/workflows/update-flake-lock.yml +++ b/.github/workflows/update-flake-lock.yml @@ -14,6 +14,7 @@ jobs: - pix - pix-ctl - pix-ctl-full + - pix-purenix - hor runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index 8d4b5c5..58c06af 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ nix flake init -t github:LovelaceAcademy/nix-templates#template-name - [pix](./pix): A PureScript purs-nix template - [pix-ctl](./pix-ctl): A minimal cardano-transaction-lib template using pix - [pix-ctl-full](./pix-ctl-full): A optioned cardano-transaction-lib template using pix +- [pix-purenix](./pix-purenix): A minimal purenix template using pix ## FAQ diff --git a/flake.nix b/flake.nix index c1a1521..2d3dc62 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,11 @@ link = "https://input-output-hk.github.io/haskell.nix/tutorials/getting-started-flakes.html"; target = ".#hello:exe:hello`"; }; + pixWelcomeText = welcome { + project = "PureScript"; + tool = "purs-nix (pix)"; + link = "https://github.com/purs-nix/purs-nix"; + }; ctlWelcomeText = welcome { project = "cardano-transaction-lib"; tool = "purs-nix (pix)"; @@ -57,13 +62,7 @@ pix = { path = ./pix; description = "A purs-nix template"; - welcomeText = '' - You just created a purs-nix project. - Read more about it here: https://github.com/purs-nix/purs-nix - - Development shell with `nix develop` - Build with `nix build` - ''; + welcomeText = pixWelcomeText; }; pix-ctl = { path = ./pix-ctl; @@ -75,6 +74,11 @@ description = "A optioned cardano-transaction-lib template using pix and webpack"; welcomeText = ctlWelcomeText; }; + pix-purenix = { + path = ./pix-purenix; + description = "A minimal purenix template using pix"; + welcomeText = pixWelcomeText; + }; }; }; } diff --git a/pix-purenix/.gitignore b/pix-purenix/.gitignore new file mode 100644 index 0000000..fa411d9 --- /dev/null +++ b/pix-purenix/.gitignore @@ -0,0 +1,3 @@ +/.psc-ide-port +/result +/output diff --git a/pix-purenix/flake.lock b/pix-purenix/flake.lock new file mode 100644 index 0000000..8c01b63 --- /dev/null +++ b/pix-purenix/flake.lock @@ -0,0 +1,1265 @@ +{ + "nodes": { + "deadnix": { + "inputs": { + "fenix": "fenix", + "naersk": "naersk", + "nixpkgs": "nixpkgs_18", + "utils": "utils" + }, + "locked": { + "lastModified": 1656370114, + "narHash": "sha256-XBbSWeBuF6Ck0jc634yAp2hjPXWM2JyRDPCdK0dh3w4=", + "owner": "astro", + "repo": "deadnix", + "rev": "9f450f7250ad7680cb5f12ce5985cc18496c2d5f", + "type": "github" + }, + "original": { + "owner": "astro", + "repo": "deadnix", + "type": "github" + } + }, + "docs-search": { + "flake": false, + "locked": { + "lastModified": 1675992564, + "narHash": "sha256-Tk9VSogFHXtXe9O9vuCEfM/PV/S7plMIO0I++fCZn7U=", + "owner": "purs-nix", + "repo": "purescript-docs-search", + "rev": "35822b1d6ce65b1a07f80dd9e2caf15c3ee83e2c", + "type": "github" + }, + "original": { + "owner": "purs-nix", + "repo": "purescript-docs-search", + "type": "github" + } + }, + "easy-purescript-nix": { + "flake": false, + "locked": { + "lastModified": 1671011575, + "narHash": "sha256-tESal32bcqqdZO+aKnBzc1GoL2mtnaDtj2y7ociCRGA=", + "owner": "justinwoo", + "repo": "easy-purescript-nix", + "rev": "11d3bd58ce6e32703bf69cec04dc7c38eabe14ba", + "type": "github" + }, + "original": { + "owner": "justinwoo", + "repo": "easy-purescript-nix", + "type": "github" + } + }, + "easy-purescript-nix_2": { + "flake": false, + "locked": { + "lastModified": 1671011575, + "narHash": "sha256-tESal32bcqqdZO+aKnBzc1GoL2mtnaDtj2y7ociCRGA=", + "owner": "justinwoo", + "repo": "easy-purescript-nix", + "rev": "11d3bd58ce6e32703bf69cec04dc7c38eabe14ba", + "type": "github" + }, + "original": { + "owner": "justinwoo", + "repo": "easy-purescript-nix", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": "nixpkgs_16", + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1655533500, + "narHash": "sha256-qJJmLVoMYfDLywI9MNL7sb0W/GsKQF9HDatdHm1tSl0=", + "owner": "nix-community", + "repo": "fenix", + "rev": "b6630603af13df17d0dd4df8629e9a24e6ba0fbd", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "purenix-pkgs", + "package-set-repo", + "nix-eval-jobs", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1678379998, + "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "purenix-pkgs", + "package-set-repo", + "purenix-base", + "nix-eval-jobs", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1678379998, + "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_10": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_11": { + "locked": { + "lastModified": 1618217525, + "narHash": "sha256-WGrhVczjXTiswQaoxQ+0PTfbLNeOQM6M36zvLn78AYg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c6169a2772643c4a93a0b5ac1c61e296cba68544", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_12": { + "locked": { + "lastModified": 1618217525, + "narHash": "sha256-WGrhVczjXTiswQaoxQ+0PTfbLNeOQM6M36zvLn78AYg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c6169a2772643c4a93a0b5ac1c61e296cba68544", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_13": { + "locked": { + "lastModified": 1618217525, + "narHash": "sha256-WGrhVczjXTiswQaoxQ+0PTfbLNeOQM6M36zvLn78AYg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c6169a2772643c4a93a0b5ac1c61e296cba68544", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_14": { + "locked": { + "lastModified": 1618217525, + "narHash": "sha256-WGrhVczjXTiswQaoxQ+0PTfbLNeOQM6M36zvLn78AYg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c6169a2772643c4a93a0b5ac1c61e296cba68544", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_5": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_6": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_7": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_8": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_9": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "get-flake": { + "locked": { + "lastModified": 1644686428, + "narHash": "sha256-zkhYsURWFrvEZLkIoBeqFBzSu+cA2u5mo6M8vq9LN7M=", + "owner": "ursi", + "repo": "get-flake", + "rev": "703f15558daa56dfae19d1858bb3046afe68831a", + "type": "github" + }, + "original": { + "owner": "ursi", + "repo": "get-flake", + "type": "github" + } + }, + "make-shell": { + "locked": { + "lastModified": 1634940815, + "narHash": "sha256-P69OmveboXzS+es1vQGS4bt+ckwbeIExqxfGLjGuJqA=", + "owner": "ursi", + "repo": "nix-make-shell", + "rev": "8add91681170924e4d0591b22f294aee3f5516f9", + "type": "github" + }, + "original": { + "owner": "ursi", + "ref": "1", + "repo": "nix-make-shell", + "type": "github" + } + }, + "make-shell_2": { + "locked": { + "lastModified": 1634940815, + "narHash": "sha256-P69OmveboXzS+es1vQGS4bt+ckwbeIExqxfGLjGuJqA=", + "owner": "ursi", + "repo": "nix-make-shell", + "rev": "8add91681170924e4d0591b22f294aee3f5516f9", + "type": "github" + }, + "original": { + "owner": "ursi", + "ref": "1", + "repo": "nix-make-shell", + "type": "github" + } + }, + "naersk": { + "inputs": { + "nixpkgs": "nixpkgs_17" + }, + "locked": { + "lastModified": 1655042882, + "narHash": "sha256-9BX8Fuez5YJlN7cdPO63InoyBy7dm3VlJkkmTt6fS1A=", + "owner": "nix-community", + "repo": "naersk", + "rev": "cddffb5aa211f50c4b8750adbec0bbbdfb26bb9f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" + } + }, + "nix-build-results": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1679755695, + "narHash": "sha256-IF2tqqJaJ6MmXD8S0zkCVgY+zDGh49CgLzvYU2UgyXQ=", + "owner": "considerate", + "repo": "nix-build-results", + "rev": "fb60f1e2ef259dfbad4f99cf40b4d45add25f393", + "type": "github" + }, + "original": { + "owner": "considerate", + "repo": "nix-build-results", + "type": "github" + } + }, + "nix-build-results_2": { + "inputs": { + "flake-utils": "flake-utils_6", + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1679684060, + "narHash": "sha256-1Qftg0SLjTqR7hnR4yWTXflzXQs7jA8YSQWeXqC4pYM=", + "owner": "considerate", + "repo": "nix-build-results", + "rev": "905de84bcde913b94f3973df7b671b80b62806d3", + "type": "github" + }, + "original": { + "owner": "considerate", + "repo": "nix-build-results", + "type": "github" + } + }, + "nix-eval-jobs": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1679275630, + "narHash": "sha256-2KyRlBpeUpQzgC+2K73NWriiS9rUsdF8bo9uf5qwWco=", + "owner": "nix-community", + "repo": "nix-eval-jobs", + "rev": "5286437bac7f1cb6d96c05879215ed8cb51e9873", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-eval-jobs", + "type": "github" + } + }, + "nix-eval-jobs_2": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1679275630, + "narHash": "sha256-2KyRlBpeUpQzgC+2K73NWriiS9rUsdF8bo9uf5qwWco=", + "owner": "nix-community", + "repo": "nix-eval-jobs", + "rev": "5286437bac7f1cb6d96c05879215ed8cb51e9873", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-eval-jobs", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1658371388, + "narHash": "sha256-ACjtJNUAqjAdR+o5EDcOGgK3aseB+IF1TSBNPVftdLg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "af7d2aaa0d7fae44cdef463538833d536e3def1f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_10": { + "locked": { + "lastModified": 1674242456, + "narHash": "sha256-yBy7rCH7EiBe9+CHZm9YB5ii5GRa+MOxeW0oDEBO8SE=", + "path": "/nix/store/sq50ymf5cvfyjqixhmkmwgcrw9iajkvx-source", + "rev": "cdead16a444a3e5de7bc9b0af8e198b11bb01804", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_11": { + "locked": { + "lastModified": 1658371388, + "narHash": "sha256-ACjtJNUAqjAdR+o5EDcOGgK3aseB+IF1TSBNPVftdLg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "af7d2aaa0d7fae44cdef463538833d536e3def1f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_12": { + "locked": { + "lastModified": 1674242456, + "narHash": "sha256-yBy7rCH7EiBe9+CHZm9YB5ii5GRa+MOxeW0oDEBO8SE=", + "path": "/nix/store/sq50ymf5cvfyjqixhmkmwgcrw9iajkvx-source", + "rev": "cdead16a444a3e5de7bc9b0af8e198b11bb01804", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_13": { + "locked": { + "lastModified": 1658371388, + "narHash": "sha256-ACjtJNUAqjAdR+o5EDcOGgK3aseB+IF1TSBNPVftdLg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "af7d2aaa0d7fae44cdef463538833d536e3def1f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_14": { + "locked": { + "lastModified": 1658371388, + "narHash": "sha256-ACjtJNUAqjAdR+o5EDcOGgK3aseB+IF1TSBNPVftdLg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "af7d2aaa0d7fae44cdef463538833d536e3def1f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_15": { + "locked": { + "lastModified": 1646506091, + "narHash": "sha256-sWNAJE2m+HOh1jtXlHcnhxsj6/sXrHgbqVNcVRlveK4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3e644bd62489b516292c816f70bf0052c693b3c7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_16": { + "locked": { + "lastModified": 1655400192, + "narHash": "sha256-49OBVVRgb9H/PSmNT9W61+NRdDbuSJVuDDflwXlaUKU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3d7435c638baffaa826b85459df0fff47f12317d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_17": { + "locked": { + "lastModified": 1655481042, + "narHash": "sha256-XHbcywq2vIQ5CeH1OK3TN793jkiNAAZsSctS1PFgseo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "103a4c0ae46afa9cf008c30744175315ca38e9f9", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_18": { + "locked": { + "lastModified": 1655481042, + "narHash": "sha256-XHbcywq2vIQ5CeH1OK3TN793jkiNAAZsSctS1PFgseo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "103a4c0ae46afa9cf008c30744175315ca38e9f9", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_19": { + "locked": { + "lastModified": 1656549732, + "narHash": "sha256-eILutFZGjfk2bEzfim8S/qyYc//0S1KsCeO+OWbtoR0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d3248619647234b5dc74a6921bcdf6dd8323eb22", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1679679161, + "narHash": "sha256-weTfVvy077MKvm+62R3dj+EpL9u7xe/PTWWH8nDHYfM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e1fa54a56982c5874f6941703c8b760541e40db1", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1679271670, + "narHash": "sha256-QKC6m81hD6JcBzGhRvI+HDEktEzf78vr5bhM3WCIeQU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "18b17c58dc248a66469df89e3d334b305d8235ec", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1679754676, + "narHash": "sha256-qnUgTdJ6J6so/9kBVB1U3Ko0eLxfCDY4TKmXxtI/QPA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9d7912fff3b7992a2d5649698973d15af4a2991a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1658371388, + "narHash": "sha256-ACjtJNUAqjAdR+o5EDcOGgK3aseB+IF1TSBNPVftdLg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "af7d2aaa0d7fae44cdef463538833d536e3def1f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1679679161, + "narHash": "sha256-weTfVvy077MKvm+62R3dj+EpL9u7xe/PTWWH8nDHYfM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e1fa54a56982c5874f6941703c8b760541e40db1", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1679271670, + "narHash": "sha256-QKC6m81hD6JcBzGhRvI+HDEktEzf78vr5bhM3WCIeQU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "18b17c58dc248a66469df89e3d334b305d8235ec", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1679165896, + "narHash": "sha256-j8qj37dtVEd5VSeJyiDx2Uvdi3xSh9gMvQq2SpTIO7s=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "738aef5117b8624ab2bc4db8509444d97029e9a4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { + "locked": { + "lastModified": 1658371388, + "narHash": "sha256-ACjtJNUAqjAdR+o5EDcOGgK3aseB+IF1TSBNPVftdLg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "af7d2aaa0d7fae44cdef463538833d536e3def1f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "package-set-repo": { + "inputs": { + "flake-utils": "flake-utils_2", + "nix-build-results": "nix-build-results", + "nix-eval-jobs": "nix-eval-jobs", + "nixpkgs": "nixpkgs_4", + "purenix": "purenix_2", + "purenix-base": "purenix-base", + "purifix": "purifix_2" + }, + "locked": { + "lastModified": 1679762558, + "narHash": "sha256-zsXzjducWBGhS+I0HhknmFVLoPoDYASwrWZF+9068lA=", + "owner": "purenix-org", + "repo": "purenix-package-sets", + "rev": "050010bc8e1932d0370b8384a262a1227159bbf2", + "type": "github" + }, + "original": { + "owner": "purenix-org", + "repo": "purenix-package-sets", + "type": "github" + } + }, + "parsec": { + "locked": { + "lastModified": 1635533376, + "narHash": "sha256-/HrG0UPGnI5VdkhrNrpDiM2+nhdL6lD/bqyGtYv0QDE=", + "owner": "nprindle", + "repo": "nix-parsec", + "rev": "1bf25dd9c5de1257a1c67de3c81c96d05e8beb5e", + "type": "github" + }, + "original": { + "owner": "nprindle", + "repo": "nix-parsec", + "type": "github" + } + }, + "ps-tools": { + "inputs": { + "deadnix": "deadnix", + "make-shell": "make-shell_2", + "nixpkgs": "nixpkgs_19", + "utils": "utils_2" + }, + "locked": { + "lastModified": 1675987041, + "narHash": "sha256-0aHIrngBLXO95SH+PjyTWJ7LWoFdJtx8y6oSln0l5Ak=", + "owner": "purs-nix", + "repo": "purescript-tools", + "rev": "7929148939325f1fed916884c53cad3c0dfa4be7", + "type": "github" + }, + "original": { + "owner": "purs-nix", + "repo": "purescript-tools", + "type": "github" + } + }, + "purenix": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1659759527, + "narHash": "sha256-4fKtudKLLUUN4vtu4xnPfWXD9wa0qUHLpA9iWIBwOpw=", + "owner": "purenix-org", + "repo": "purenix", + "rev": "5587e599a39811d6d1645e7d2cfed559506e3637", + "type": "github" + }, + "original": { + "owner": "purenix-org", + "repo": "purenix", + "type": "github" + } + }, + "purenix-base": { + "inputs": { + "flake-utils": "flake-utils_5", + "nix-build-results": "nix-build-results_2", + "nix-eval-jobs": "nix-eval-jobs_2", + "nixpkgs": "nixpkgs_8", + "purenix": "purenix_3", + "purifix": "purifix" + }, + "locked": { + "lastModified": 1679684098, + "narHash": "sha256-oggb+prfsqu4MRVNNiPhjp3vbE7HcwdDCIzsL91Z7dk=", + "owner": "purenix-org", + "repo": "purenix-base", + "rev": "856f243d0aa214ee0a0f90e4be6045b6fee95bca", + "type": "github" + }, + "original": { + "owner": "purenix-org", + "ref": "construct-package-sets", + "repo": "purenix-base", + "type": "github" + } + }, + "purenix-pkgs": { + "inputs": { + "nixpkgs": [ + "purenix-pkgs", + "purs-nix", + "nixpkgs" + ], + "package-set-repo": "package-set-repo", + "ps-tools": [ + "purenix-pkgs", + "purs-nix", + "ps-tools" + ], + "purenix": "purenix_6", + "purs-nix": "purs-nix", + "utils": "utils_4" + }, + "locked": { + "lastModified": 1689486409, + "narHash": "sha256-+pi7RXZ7bW0Q0Q3NMzfvQcZtiXifvP4MQxr3ZZPxEMQ=", + "owner": "klarkc", + "repo": "purenix-packages", + "rev": "726f9796331c5db703ce74e3d42e1cc4eb0ffe65", + "type": "github" + }, + "original": { + "owner": "klarkc", + "ref": "add-registry", + "repo": "purenix-packages", + "type": "github" + } + }, + "purenix_2": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1659759527, + "narHash": "sha256-4fKtudKLLUUN4vtu4xnPfWXD9wa0qUHLpA9iWIBwOpw=", + "owner": "purenix-org", + "repo": "purenix", + "rev": "5587e599a39811d6d1645e7d2cfed559506e3637", + "type": "github" + }, + "original": { + "owner": "purenix-org", + "repo": "purenix", + "type": "github" + } + }, + "purenix_3": { + "inputs": { + "flake-utils": "flake-utils_7", + "nixpkgs": "nixpkgs_9" + }, + "locked": { + "lastModified": 1659759527, + "narHash": "sha256-4fKtudKLLUUN4vtu4xnPfWXD9wa0qUHLpA9iWIBwOpw=", + "owner": "purenix-org", + "repo": "purenix", + "rev": "5587e599a39811d6d1645e7d2cfed559506e3637", + "type": "github" + }, + "original": { + "owner": "purenix-org", + "repo": "purenix", + "type": "github" + } + }, + "purenix_4": { + "inputs": { + "flake-utils": "flake-utils_8", + "nixpkgs": "nixpkgs_11" + }, + "locked": { + "lastModified": 1659759527, + "narHash": "sha256-4fKtudKLLUUN4vtu4xnPfWXD9wa0qUHLpA9iWIBwOpw=", + "owner": "purenix-org", + "repo": "purenix", + "rev": "5587e599a39811d6d1645e7d2cfed559506e3637", + "type": "github" + }, + "original": { + "owner": "purenix-org", + "repo": "purenix", + "type": "github" + } + }, + "purenix_5": { + "inputs": { + "flake-utils": "flake-utils_9", + "nixpkgs": "nixpkgs_13" + }, + "locked": { + "lastModified": 1659759527, + "narHash": "sha256-4fKtudKLLUUN4vtu4xnPfWXD9wa0qUHLpA9iWIBwOpw=", + "owner": "purenix-org", + "repo": "purenix", + "rev": "5587e599a39811d6d1645e7d2cfed559506e3637", + "type": "github" + }, + "original": { + "owner": "purenix-org", + "repo": "purenix", + "type": "github" + } + }, + "purenix_6": { + "inputs": { + "flake-utils": "flake-utils_10", + "nixpkgs": "nixpkgs_14" + }, + "locked": { + "lastModified": 1659759527, + "narHash": "sha256-4fKtudKLLUUN4vtu4xnPfWXD9wa0qUHLpA9iWIBwOpw=", + "owner": "purenix-org", + "repo": "purenix", + "rev": "5587e599a39811d6d1645e7d2cfed559506e3637", + "type": "github" + }, + "original": { + "owner": "purenix-org", + "repo": "purenix", + "type": "github" + } + }, + "purescript-registry": { + "flake": false, + "locked": { + "lastModified": 1678951323, + "narHash": "sha256-XKWg5H290FghUp7YIl6AV27N4JBigp5Vt7cfyxBGgjo=", + "owner": "purescript", + "repo": "registry", + "rev": "e60870d86d792dc86ffb3fc949074dc4601f0ea3", + "type": "github" + }, + "original": { + "owner": "purescript", + "repo": "registry", + "type": "github" + } + }, + "purescript-registry-index": { + "flake": false, + "locked": { + "lastModified": 1678945964, + "narHash": "sha256-9HbsfTAIMYY5v30sLVqFRbS60X/0KABXXYT1v5wRvbg=", + "owner": "purescript", + "repo": "registry-index", + "rev": "ed2d1ea620a8e1c854191e485dc5359ea7b251f6", + "type": "github" + }, + "original": { + "owner": "purescript", + "repo": "registry-index", + "type": "github" + } + }, + "purescript-registry-index_2": { + "flake": false, + "locked": { + "lastModified": 1679603159, + "narHash": "sha256-ldwSgDaIrdn+0aEbGacCv7ZhisY1VBo9Y+zLvtuEzxY=", + "owner": "purescript", + "repo": "registry-index", + "rev": "205aab977a9d3ec694ea4e528977799ed2ae95b0", + "type": "github" + }, + "original": { + "owner": "purescript", + "repo": "registry-index", + "type": "github" + } + }, + "purescript-registry_2": { + "flake": false, + "locked": { + "lastModified": 1679603156, + "narHash": "sha256-3OkRGCoAw/53Bsf1BFyzFGOrf9OXgIpvVYFaxBJgHms=", + "owner": "purescript", + "repo": "registry", + "rev": "3c107daa7aa93129ed3abcf06f46e4c1da8e0dfd", + "type": "github" + }, + "original": { + "owner": "purescript", + "repo": "registry", + "type": "github" + } + }, + "purifix": { + "inputs": { + "easy-purescript-nix": "easy-purescript-nix", + "nixpkgs": "nixpkgs_10", + "purenix": "purenix_4", + "purescript-registry": "purescript-registry", + "purescript-registry-index": "purescript-registry-index" + }, + "locked": { + "lastModified": 1679339091, + "narHash": "sha256-+jc+HFfAWfFZ6o5ZWVRsFyMmt4Mesu1VEMyAi9lpfGo=", + "owner": "purifix", + "repo": "purifix", + "rev": "42e7803889c1335ecaf6dbe5d3f2f75950c8b3ba", + "type": "github" + }, + "original": { + "owner": "purifix", + "repo": "purifix", + "type": "github" + } + }, + "purifix_2": { + "inputs": { + "easy-purescript-nix": "easy-purescript-nix_2", + "nixpkgs": "nixpkgs_12", + "purenix": "purenix_5", + "purescript-registry": "purescript-registry_2", + "purescript-registry-index": "purescript-registry-index_2" + }, + "locked": { + "lastModified": 1679761234, + "narHash": "sha256-gogCUA1if10hYBor6R+Dcw8XnX8D0ufBY/F0yGSlv5U=", + "owner": "purifix", + "repo": "purifix", + "rev": "7dbe2a2159884f7113c01070fd5bc50d01ab0d30", + "type": "github" + }, + "original": { + "owner": "purifix", + "repo": "purifix", + "type": "github" + } + }, + "purs-nix": { + "inputs": { + "docs-search": "docs-search", + "get-flake": "get-flake", + "make-shell": "make-shell", + "nixpkgs": "nixpkgs_15", + "parsec": "parsec", + "ps-tools": "ps-tools", + "utils": "utils_3" + }, + "locked": { + "lastModified": 1684433609, + "narHash": "sha256-fA7nTBbXR7zd7/PJkNrPA8pJzRCsOW20FRy8SzdEgJ0=", + "owner": "purs-nix", + "repo": "purs-nix", + "rev": "02f87b0ecbe0e286dff1da37038325d4a3a128c3", + "type": "github" + }, + "original": { + "owner": "purs-nix", + "repo": "purs-nix", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": [ + "purenix-pkgs", + "nixpkgs" + ], + "purenix": "purenix", + "purenix-pkgs": "purenix-pkgs", + "purs-nix": [ + "purenix-pkgs", + "purs-nix" + ], + "utils": "utils_5" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1655507737, + "narHash": "sha256-o+AqNsjL6o2RHh4InZHQVpkmqg570YFJL4Db8mKq+fs=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "12dd81092e37df28b7a3591cae9675e668927198", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "utils": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_2": { + "inputs": { + "flake-utils": "flake-utils_11" + }, + "locked": { + "lastModified": 1656044990, + "narHash": "sha256-f01BB7CaOyntOab9XnpH9HD63rGcnu2iyL4M2ubs5F8=", + "owner": "ursi", + "repo": "flake-utils", + "rev": "f53b674a2c90f6202a2f4cd491aba121775490b5", + "type": "github" + }, + "original": { + "owner": "ursi", + "ref": "8", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_3": { + "inputs": { + "flake-utils": "flake-utils_12" + }, + "locked": { + "lastModified": 1656044990, + "narHash": "sha256-f01BB7CaOyntOab9XnpH9HD63rGcnu2iyL4M2ubs5F8=", + "owner": "ursi", + "repo": "flake-utils", + "rev": "f53b674a2c90f6202a2f4cd491aba121775490b5", + "type": "github" + }, + "original": { + "owner": "ursi", + "ref": "8", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_4": { + "inputs": { + "flake-utils": "flake-utils_13" + }, + "locked": { + "lastModified": 1658606827, + "narHash": "sha256-3kSWTDpV4+uApt/Xd0kv2m7TR1Y6A7SgYUeX86/qYuU=", + "owner": "ursi", + "repo": "flake-utils", + "rev": "faec5f7431da6747a69957a9cd65e35b5173e10a", + "type": "github" + }, + "original": { + "owner": "ursi", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_5": { + "inputs": { + "flake-utils": "flake-utils_14" + }, + "locked": { + "lastModified": 1658606827, + "narHash": "sha256-3kSWTDpV4+uApt/Xd0kv2m7TR1Y6A7SgYUeX86/qYuU=", + "owner": "ursi", + "repo": "flake-utils", + "rev": "faec5f7431da6747a69957a9cd65e35b5173e10a", + "type": "github" + }, + "original": { + "owner": "ursi", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/pix-purenix/flake.nix b/pix-purenix/flake.nix new file mode 100644 index 0000000..d95222f --- /dev/null +++ b/pix-purenix/flake.nix @@ -0,0 +1,91 @@ +{ + inputs = { + purenix-pkgs.url = "github:klarkc/purenix-packages/add-registry"; + nixpkgs.follows = "purenix-pkgs/nixpkgs"; + purs-nix.follows = "purenix-pkgs/purs-nix"; + #ps-tools.follows = "purenix-pkgs/ps-tools"; + purenix.url = "github:purenix-org/purenix"; + utils.url = "github:ursi/flake-utils"; + }; + + outputs = { self, utils, ... }@inputs: + let + # TODO add missing arm to match standard systems + # right now purs-nix is only compatible with x86_64-linux + systems = [ "x86_64-linux" ]; + in + utils.apply-systems + { inherit inputs systems; } + ({ system, pkgs, purenix-pkgs, ... }: + let + compile = { codegen = "corefn"; }; + purs-nix = inputs.purs-nix { + inherit system; + defaults = { inherit compile; }; + overlays = [ purenix-pkgs.overlay ]; + }; + ps = purs-nix.purs + { + # Project dir (src, test) + dir = ./.; + # Dependencies + dependencies = + with purs-nix.ps-pkgs; + [ + prelude + ]; + # use compatible compiler + inherit (purenix-pkgs) purescript; + }; + prefix = "output"; + purenix-output = pkgs.stdenv.mkDerivation + { + inherit prefix; + name = "purenix-output"; + src = ps.output { }; + nativeBuildInputs = with pkgs; [ purenix tree ]; + dontInstall = true; + postBuild = '' + mkdir -p $out + cp -L -r $src $out/${prefix} + chmod -R u+w $out/${prefix} + cd $out + purenix + ''; + }; + in + { + packages.default = purenix-output; + + devShells.default = + pkgs.mkShell + { + packages = + with pkgs; + [ + (ps.command { inherit compile; }) + # optional devShell tools + # ps-tools.for-0_15.purescript-language-server + # ps-tools.for-0_15.purty + # purs-nix.esbuild + # purs-nix.purescript + # nodejs + ]; + }; + }); + + # --- Flake Local Nix Configuration ---------------------------- + nixConfig = { + # This sets the flake to use nix cache. + # Nix should ask for permission before using it, + # but remove it here if you do not want it to. + extra-substituters = [ + "https://klarkc.cachix.org?priority=99" + "https://cache.nixos.org" + ]; + extra-trusted-public-keys = [ + "klarkc.cachix.org-1:R+z+m4Cq0hMgfZ7AQ42WRpGuHJumLLx3k0XhwpNFq9U=" + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + }; +} diff --git a/pix-purenix/src/Main.purs b/pix-purenix/src/Main.purs new file mode 100644 index 0000000..a5bc0bf --- /dev/null +++ b/pix-purenix/src/Main.purs @@ -0,0 +1,9 @@ +module Main where + +import Prelude ((==)) + +foo :: String +foo = "foo" + +main :: { result :: Boolean } +main = { result: "foo" == foo }