diff --git a/.envrc b/.envrc index 3b03789..f1d1681 100644 --- a/.envrc +++ b/.envrc @@ -1,4 +1,9 @@ # shellcheck disable=SC1090 -source "$(fetchurl "https://raw.githubusercontent.com/paisano-nix/direnv/main/lib" "sha256-R3K8Flvbovj4IOvdlWNtQKLMMSQV464WjG9eU29ixHk=")" +watch_file flakes.nix flake.lock +watch_file local/flake.nix local/flake.lock +# shellcheck disable=SC1090 +source "$(fetchurl "https://raw.githubusercontent.com/gtrunsec/direnv/main/lib" "sha256-tuMA8WGkwcYq9V3MtlN6xdVvKd2YkdEpdK4ZyAN6VDM=")" + +registry="$PRJ_ROOT/nix/std#__std" use envreload //julia2nix/devshells/default diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 5773c7c..a480bf7 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -11,25 +11,22 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.3 - - uses: nixbuild/nix-quick-install-action@v21 - with: - nix_conf: | - experimental-features = nix-command flakes - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@main + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main - - uses: cachix/cachix-action@v12 - with: - name: zeek + - name: Julia Version Update + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' + nix develop .#update --command nvfetcher-update - - name: Julia Version Update - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - nix develop .#update --command nvfetcher-update - - - name: Commit changes - if: ${{ env.COMMIT_MSG != null }} - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: ${{ env.COMMIT_MSG }} + - name: "Create Pull Request" + uses: "peter-evans/create-pull-request@v5" + with: + branch: "auto_update_nightly" + title: "Update nightly versions" + body: | + Automatically updated the nightly version diff --git a/.github/workflows/nix-darwin.yaml b/.github/workflows/nix-darwin.yaml index 3d8417f..e4c28ab 100644 --- a/.github/workflows/nix-darwin.yaml +++ b/.github/workflows/nix-darwin.yaml @@ -11,13 +11,9 @@ jobs: runs-on: macOS-latest steps: - - uses: actions/checkout@v3.5.3 - - - uses: nixbuild/nix-quick-install-action@v21 - with: - nix_conf: | - experimental-features = nix-command flakes - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@main + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main - name: Init julia2nix.jl with nix develop run: | diff --git a/.github/workflows/nix-linux.yaml b/.github/workflows/nix-linux.yaml index fb371ec..f1b81f0 100644 --- a/.github/workflows/nix-linux.yaml +++ b/.github/workflows/nix-linux.yaml @@ -9,16 +9,9 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.5.3 - - uses: nixbuild/nix-quick-install-action@v21 - with: - nix_conf: | - experimental-features = nix-command flakes - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - - uses: cachix/cachix-action@v12 - with: - name: zeek + - uses: actions/checkout@main + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main - name: Nix Flake Show run: nix flake show @@ -30,7 +23,7 @@ jobs: run: nix develop --show-trace --command -- init - name: Build JuliaDoc - run: nix run -Lv .#x86_64-linux.julia2nix.entrypoints.mkdoc docs + run: nix run -Lv ./nix/std#x86_64-linux.julia2nix.entrypoints.mkdoc docs - name: Check Template Shells run: | @@ -52,9 +45,9 @@ jobs: run: | nix -Lv develop --command buildProject - - name: Build jlrs -> call_julia - run: | - nix develop ./templates/jlrs --override-input julia2nix ./. --show-trace --command -- call-julia + # - name: Build jlrs -> call_julia + # run: | + # nix develop ./templates/jlrs --override-input julia2nix ./. --show-trace --command -- call-julia - name: Deploy uses: JamesIves/github-pages-deploy-action@v4.4.2 diff --git a/flake.lock b/flake.lock index 3f934fb..2c4ee74 100644 --- a/flake.lock +++ b/flake.lock @@ -1,694 +1,27 @@ { "nodes": { - "POP": { - "inputs": { - "flake-compat": "flake-compat", - "nixlib": "nixlib", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1655410953, - "narHash": "sha256-Er0zdhu7QwpWvVKfauqZqTnxDz6THTWOTVWLoz+Opmw=", - "owner": "divnix", - "repo": "POP", - "rev": "8babe4c9126298d05ebb5ab04727d741b51c022e", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "POP", - "type": "github" - } - }, - "blank": { - "locked": { - "lastModified": 1625557891, - "narHash": "sha256-O8/MWsPBGhhyPoPLHZAuoZiiHo9q6FLlEeIDEXuj6T4=", - "owner": "divnix", - "repo": "blank", - "rev": "5a5d2684073d9f563072ed07c871d577a6c614a8", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "blank", - "type": "github" - } - }, - "cortex": { - "flake": false, - "locked": { - "lastModified": 1643528409, - "narHash": "sha256-ldmenmCzCEuuBlMtaQYe79vYbcTORgkCXgYgGkOzkL8=", - "owner": "gtrunsec", - "repo": "cortex", - "rev": "ad9a963534e5be323a33eaf0f9aa3e914cca8093", - "type": "github" - }, - "original": { - "owner": "gtrunsec", - "repo": "cortex", - "type": "github" - } - }, - "crane": { - "inputs": { - "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_4", - "nixpkgs": [ - "std-ext", - "std", - "paisano-mdbook-preprocessor", - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1676162383, - "narHash": "sha256-krUCKdz7ebHlFYm/A7IbKDnj2ZmMMm3yIEQcooqm7+E=", - "owner": "ipetkov", - "repo": "crane", - "rev": "6fb400ec631b22ccdbc7090b38207f7fb5cfb5f2", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "devshell": { - "inputs": { - "flake-utils": [ - "std-ext", - "std", - "flake-utils" - ], - "nixpkgs": [ - "std-ext", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1682700442, - "narHash": "sha256-qjaAAcCYgp1pBBG7mY9z95ODUBZMtUpf0Qp3Gt/Wha0=", - "owner": "numtide", - "repo": "devshell", - "rev": "fb6673fe9fe4409e3f43ca86968261e970918a83", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, - "dmerge": { - "inputs": { - "haumea": [ - "std-ext", - "flops", - "haumea" - ], - "namaka": [ - "std-ext", - "flops", - "namaka" - ], - "nixlib": "nixlib_2", - "yants": "yants" - }, - "locked": { - "lastModified": 1684239705, - "narHash": "sha256-goQcIld5PfRlIfC3atNLzLqnOHaMh9m4yoyykraDNlM=", - "owner": "divnix", - "repo": "dmerge", - "rev": "a740c5632789ff872a54a5b6595ef07287ff273e", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "dmerge", - "type": "github" - } - }, - "dmerge_2": { - "inputs": { - "haumea": "haumea_2", - "namaka": "namaka_2", - "nixlib": [ - "std-ext", - "std", - "nixpkgs" - ], - "yants": [ - "std-ext", - "std", - "yants" - ] - }, - "locked": { - "lastModified": 1684178600, - "narHash": "sha256-EtSQcCHRQUBBEj4vbYU0vgPUYiKP261ero5k1QfQ3Bc=", - "owner": "divnix", - "repo": "dmerge", - "rev": "ac9932f26325afac5baa59cf6478432d17762a4e", - "type": "github" - }, - "original": { - "owner": "divnix", - "ref": "0.2.0", - "repo": "dmerge", - "type": "github" - } - }, - "emacs-overlay": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_6" - }, - "locked": { - "lastModified": 1676258056, - "narHash": "sha256-LhXVnPc+IPHupy7QexUrzYuloSGXvXEgvIkAlhFs+yY=", - "owner": "nix-community", - "repo": "emacs-overlay", - "rev": "09ebba158540ba3171b5f319b71427b51db8794b", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "emacs-overlay", - "type": "github" - } - }, - "fenix": { - "inputs": { - "nixpkgs": "nixpkgs_7", - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1677306201, - "narHash": "sha256-VZ9x7qdTosFvVsrpgFHrtYfT6PU3yMIs7NRYn9ELapI=", - "owner": "nix-community", - "repo": "fenix", - "rev": "0923f0c162f65ae40261ec940406049726cfeab4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flops": { - "inputs": { - "POP": "POP", - "dmerge": "dmerge", - "haumea": "haumea", - "namaka": "namaka", - "nixlib": "nixlib_3", - "yants": "yants_2" - }, - "locked": { - "lastModified": 1685155146, - "narHash": "sha256-VByJ7DGoYz+m2CMkbAo4ABR1UJ/HM8wy/43FJMek5Kk=", - "owner": "gtrunsec", - "repo": "flops", - "rev": "b7a140cc87c4e8c1cda484f7ccba6af80dafd448", - "type": "github" - }, - "original": { - "owner": "gtrunsec", - "repo": "flops", - "type": "github" - } - }, - "haumea": { - "inputs": { - "nixpkgs": [ - "std-ext", - "flops", - "nixlib" - ] - }, - "locked": { - "lastModified": 1685133574, - "narHash": "sha256-BH/utyzbdD74772wQ2JUf0QP9hw8vz8QhjLAt/W5NhU=", - "owner": "nix-community", - "repo": "haumea", - "rev": "214d73d9d5c44f92b6401af688c2688448768e23", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "haumea", - "type": "github" - } - }, - "haumea_2": { - "inputs": { - "nixpkgs": [ - "std-ext", - "std", - "dmerge", - "nixlib" - ] - }, - "locked": { - "lastModified": 1681176209, - "narHash": "sha256-bJLDun6esIyWtwRVXcsgzGbh4UKu8wJDrPgykqPyzmg=", - "owner": "nix-community", - "repo": "haumea", - "rev": "b915b66b27da3a595d77b139e945bb0a2fcac926", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "haumea", - "type": "github" - } - }, - "incl": { - "inputs": { - "nixlib": [ - "std-ext", - "std", - "nixpkgs" - ] - }, + "call-flake": { "locked": { - "lastModified": 1669263024, - "narHash": "sha256-E/+23NKtxAqYG/0ydYgxlgarKnxmDbg6rCMWnOBqn9Q=", + "lastModified": 1698542398, + "narHash": "sha256-bmhE1TmrJG4ba93l9WQTLuYM53kwGQAjYHRvHOeuxWU=", "owner": "divnix", - "repo": "incl", - "rev": "ce7bebaee048e4cd7ebdb4cee7885e00c4e2abca", + "repo": "call-flake", + "rev": "4c92816c2ba27a91f8252a9305a14173e1293571", "type": "github" }, "original": { "owner": "divnix", - "repo": "incl", - "type": "github" - } - }, - "n2c": { - "inputs": { - "flake-utils": [ - "std-ext", - "std", - "flake-utils" - ], - "nixpkgs": [ - "std-ext", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1677330646, - "narHash": "sha256-hUYCwJneMjnxTvj30Fjow6UMJUITqHlpUGpXMPXUJsU=", - "owner": "nlewo", - "repo": "nix2container", - "rev": "ebca8f58d450cae1a19c07701a5a8ae40afc9efc", - "type": "github" - }, - "original": { - "owner": "nlewo", - "repo": "nix2container", - "type": "github" - } - }, - "namaka": { - "inputs": { - "haumea": [ - "std-ext", - "flops", - "haumea" - ], - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1683059428, - "narHash": "sha256-ZTMqleCWmuNWhZE375gtF1j1JRkaKEUFN1AM43e7h4Y=", - "owner": "nix-community", - "repo": "namaka", - "rev": "2deba2f416454aec770bc1cc7365e39c73e6b1d7", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "v0.1.1", - "repo": "namaka", - "type": "github" - } - }, - "namaka_2": { - "inputs": { - "haumea": [ - "std-ext", - "std", - "dmerge", - "haumea" - ], - "nixpkgs": [ - "std-ext", - "std", - "dmerge", - "nixlib" - ] - }, - "locked": { - "lastModified": 1683059428, - "narHash": "sha256-ZTMqleCWmuNWhZE375gtF1j1JRkaKEUFN1AM43e7h4Y=", - "owner": "nix-community", - "repo": "namaka", - "rev": "2deba2f416454aec770bc1cc7365e39c73e6b1d7", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "v0.1.1", - "repo": "namaka", - "type": "github" - } - }, - "nix-filter": { - "locked": { - "lastModified": 1666547822, - "narHash": "sha256-razwnAybPHyoAyhkKCwXdxihIqJi1G6e1XP4FQOJTEs=", - "owner": "numtide", - "repo": "nix-filter", - "rev": "1a3b735e13e90a8d2fd5629f2f8363bd7ffbbec7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "nix-filter", - "type": "github" - } - }, - "nix-filter_2": { - "locked": { - "lastModified": 1666547822, - "narHash": "sha256-razwnAybPHyoAyhkKCwXdxihIqJi1G6e1XP4FQOJTEs=", - "owner": "numtide", - "repo": "nix-filter", - "rev": "1a3b735e13e90a8d2fd5629f2f8363bd7ffbbec7", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "nix-filter", - "type": "github" - } - }, - "nixago": { - "inputs": { - "flake-utils": [ - "std-ext", - "std", - "flake-utils" - ], - "nixago-exts": [ - "std-ext", - "std", - "blank" - ], - "nixpkgs": [ - "std-ext", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1683210100, - "narHash": "sha256-bhGDOlkWtlhVECpoOog4fWiFJmLCpVEg09a40aTjCbw=", - "owner": "nix-community", - "repo": "nixago", - "rev": "1da60ad9412135f9ed7a004669fdcf3d378ec630", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixago", - "type": "github" - } - }, - "nixlib": { - "locked": { - "lastModified": 1653180592, - "narHash": "sha256-sVGwmxTj7CY1D4ioy7E+iJE+1/yHqQlxjnTpar3ap/E=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "42c5f5785b70cd64b4afd830dc31d0b08461abd5", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixlib_2": { - "locked": { - "lastModified": 1681001314, - "narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixlib_3": { - "locked": { - "lastModified": 1681001314, - "narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixos": { - "locked": { - "lastModified": 1683408522, - "narHash": "sha256-9kcPh6Uxo17a3kK3XCHhcWiV1Yu1kYj22RHiymUhMkU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "897876e4c484f1e8f92009fd11b7d988a121a4e7", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", + "repo": "call-flake", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1686519857, - "narHash": "sha256-VkBhuq67aXXiCoEmicziuDLUPPjeOTLQoj6OeVai5zM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "6b1b72c0f887a478a5aac355674ff6df0fc44f44", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lock": { - "locked": { - "lastModified": 1663419078, - "narHash": "sha256-cxEeMnaTGMTeDAvXnZmqcF50qoyJOsQENhYxSnW9ZMs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0cfb3c002b61807ca0bab3efe514476bdf2e5478", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0cfb3c002b61807ca0bab3efe514476bdf2e5478", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1653581809, - "narHash": "sha256-Uvka0V5MTGbeOfWte25+tfRL3moECDh1VwokWSZUdoY=", + "lastModified": 1698553279, + "narHash": "sha256-T/9P8yBSLcqo/v+FTOBK+0rjzjPMctVymZydbvR/Fak=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "83658b28fe638a170a19b8933aa008b30640fbd1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1680758185, - "narHash": "sha256-sCVWwfnk7zEX8Z+OItiH+pcSklrlsLZ4TJTtnxAYREw=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "0e19daa510e47a40e06257e205965f3b96ce0ac9", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1660438583, - "narHash": "sha256-rJUTYxFKlWUJI3njAwEc1pKAVooAViZGJvsgqfh/q/E=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "bbd8f7cd87d0b29294ef3072ffdbd61d60f05da4", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1685399834, - "narHash": "sha256-Lt7//5snriXSdJo5hlVcDkpERL1piiih0UXIz1RUcC4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "58c85835512b0db938600b6fe13cc3e3dc4b364e", + "rev": "90e85bc7c1a6fc0760a94ace129d3a1c61c3d035", "type": "github" }, "original": { @@ -698,423 +31,27 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs-julia": { "locked": { - "lastModified": 1673540789, - "narHash": "sha256-xqnxBOK3qctIeUVxecydrEDbEXjsvHCPGPbvsl63M/U=", + "lastModified": 1694073329, + "narHash": "sha256-F6+k1FSgtFSXaGSQqf00u/jBHhvUvrsTx9qjEWAk0E0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0f213d0fee84280d8c3a97f7469b988d6fe5fcdf", + "rev": "ddadf5f46ac96423efbd67228ffe84361743c253", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_7": { - "locked": { - "lastModified": 1677063315, - "narHash": "sha256-qiB4ajTeAOVnVSAwCNEEkoybrAlA+cpeiBxLobHndE8=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "988cc958c57ce4350ec248d2d53087777f9e1949", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", + "ref": "refs/pull/225513/head", "repo": "nixpkgs", "type": "github" } }, - "nosys": { - "locked": { - "lastModified": 1668010795, - "narHash": "sha256-JBDVBnos8g0toU7EhIIqQ1If5m/nyBqtHhL3sicdPwI=", - "owner": "divnix", - "repo": "nosys", - "rev": "feade0141487801c71ff55623b421ed535dbdefa", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "nosys", - "type": "github" - } - }, - "org-roam-book-template": { - "inputs": { - "cortex": "cortex", - "emacs-overlay": "emacs-overlay", - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_2", - "nix-filter": "nix-filter_2", - "nixpkgs": [ - "std-ext", - "nixpkgs" - ], - "ox-hugo": "ox-hugo" - }, - "locked": { - "lastModified": 1678147210, - "narHash": "sha256-Mj9C519d0F8aQC3dTk3TCOGAdBg8bX9BkALordtZ3Po=", - "owner": "gtrunsec", - "repo": "org-roam-book-template", - "rev": "c97abbc42e7048fb866c5dfff78b04846b87570d", - "type": "github" - }, - "original": { - "owner": "gtrunsec", - "repo": "org-roam-book-template", - "type": "github" - } - }, - "ox-hugo": { - "flake": false, - "locked": { - "lastModified": 1669851508, - "narHash": "sha256-7m9B647uOBnSWYsxIfavlTCsT8loDm33v/epqYSUhLw=", - "owner": "kaushalmodi", - "repo": "ox-hugo", - "rev": "706b5f622d168bb8e0cf503e0525d2db9177c83e", - "type": "github" - }, - "original": { - "owner": "kaushalmodi", - "repo": "ox-hugo", - "type": "github" - } - }, - "paisano": { - "inputs": { - "nixpkgs": [ - "std-ext", - "std", - "nixpkgs" - ], - "nosys": "nosys", - "yants": [ - "std-ext", - "std", - "yants" - ] - }, - "locked": { - "lastModified": 1678949904, - "narHash": "sha256-oAoF66hYYz1RPh3lEwb9/4e4iyBAfTbQKZRRQ8gP0Ds=", - "owner": "paisano-nix", - "repo": "core", - "rev": "88f2aff10a5064551d1d4cb86800d17084489ce3", - "type": "github" - }, - "original": { - "owner": "paisano-nix", - "repo": "core", - "type": "github" - } - }, - "paisano-actions": { - "inputs": { - "nixpkgs": [ - "std-ext", - "std", - "paisano-mdbook-preprocessor", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1677306424, - "narHash": "sha256-H9/dI2rGEbKo4KEisqbRPHFG2ajF8Tm111NPdKGIf28=", - "owner": "paisano-nix", - "repo": "actions", - "rev": "65ec4e080b3480167fc1a748c89a05901eea9a9b", - "type": "github" - }, - "original": { - "owner": "paisano-nix", - "repo": "actions", - "type": "github" - } - }, - "paisano-mdbook-preprocessor": { - "inputs": { - "crane": "crane", - "fenix": "fenix", - "nixpkgs": [ - "std-ext", - "std", - "nixpkgs" - ], - "paisano-actions": "paisano-actions", - "std": [ - "std-ext", - "std" - ] - }, - "locked": { - "lastModified": 1680654400, - "narHash": "sha256-Qdpio+ldhUK3zfl22Mhf8HUULdUOJXDWDdO7MIK69OU=", - "owner": "paisano-nix", - "repo": "mdbook-paisano-preprocessor", - "rev": "11a8fc47f574f194a7ae7b8b98001f6143ba4cf1", - "type": "github" - }, - "original": { - "owner": "paisano-nix", - "repo": "mdbook-paisano-preprocessor", - "type": "github" - } - }, - "paisano-tui": { - "inputs": { - "nixpkgs": [ - "std-ext", - "std", - "blank" - ], - "std": [ - "std-ext", - "std" - ] - }, - "locked": { - "lastModified": 1681847764, - "narHash": "sha256-mdd7PJW1BZvxy0cIKsPfAO+ohVl/V7heE5ZTAHzTdv8=", - "owner": "paisano-nix", - "repo": "tui", - "rev": "3096bad91cae73ab8ab3367d31f8a143d248a244", - "type": "github" - }, - "original": { - "owner": "paisano-nix", - "ref": "0.1.1", - "repo": "tui", - "type": "github" - } - }, "root": { "inputs": { - "nix-filter": "nix-filter", + "call-flake": "call-flake", "nixpkgs": "nixpkgs", - "nixpkgs-lock": "nixpkgs-lock", - "std": [ - "std-ext", - "std" - ], - "std-data-collection": [ - "std-ext", - "std-data-collection" - ], - "std-ext": "std-ext" - } - }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1677221702, - "narHash": "sha256-1M+58rC4eTCWNmmX0hQVZP20t3tfYNunl9D/PrGUyGE=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "f5401f620699b26ed9d47a1d2e838143a18dbe3b", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, - "rust-overlay": { - "inputs": { - "flake-utils": [ - "std-ext", - "std", - "paisano-mdbook-preprocessor", - "crane", - "flake-utils" - ], - "nixpkgs": [ - "std-ext", - "std", - "paisano-mdbook-preprocessor", - "crane", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1675391458, - "narHash": "sha256-ukDKZw922BnK5ohL9LhwtaDAdCsJL7L6ScNEyF1lO9w=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "383a4acfd11d778d5c2efcf28376cbd845eeaedf", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "std": { - "inputs": { - "arion": [ - "std-ext", - "std", - "blank" - ], - "blank": "blank", - "devshell": "devshell", - "dmerge": "dmerge_2", - "flake-utils": "flake-utils_3", - "incl": "incl", - "makes": [ - "std-ext", - "std", - "blank" - ], - "microvm": [ - "std-ext", - "std", - "blank" - ], - "n2c": "n2c", - "nixago": "nixago", - "nixpkgs": [ - "std-ext", - "nixpkgs" - ], - "paisano": "paisano", - "paisano-mdbook-preprocessor": "paisano-mdbook-preprocessor", - "paisano-tui": "paisano-tui", - "yants": "yants_3" - }, - "locked": { - "lastModified": 1684882168, - "narHash": "sha256-Yu1yw1sPWZsXe7BX7HaHg+O8fWKHCpy/AwgGfBdhivw=", - "owner": "divnix", - "repo": "std", - "rev": "959f54d6698ff7fea01e4e6d8e5d7d95fcf66844", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "std", - "type": "github" - } - }, - "std-data-collection": { - "inputs": { - "nixpkgs": [ - "std-ext", - "nixpkgs" - ], - "std": [ - "std-ext", - "std" - ] - }, - "locked": { - "lastModified": 1676163535, - "narHash": "sha256-xofkWLBqU4zj5vzJhWor2Z9CyPGKt7UGkTchsCT48Po=", - "owner": "divnix", - "repo": "std-data-collection", - "rev": "f713d81a6197e1b0854fb201cc7acde5ef9e93d4", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "std-data-collection", - "type": "github" - } - }, - "std-ext": { - "inputs": { - "flops": "flops", - "nixos": "nixos", - "nixpkgs": "nixpkgs_5", - "org-roam-book-template": "org-roam-book-template", - "std": "std", - "std-data-collection": "std-data-collection" - }, - "locked": { - "lastModified": 1685482807, - "narHash": "sha256-ssieO2aCYgWKIMVvkJGxrAAD1pfIBgdLWA28EeSVbCE=", - "owner": "gtrunsec", - "repo": "std-ext", - "rev": "64c26586c586e7369f25e4ce43ea10d6cc74bd33", - "type": "github" - }, - "original": { - "owner": "gtrunsec", - "repo": "std-ext", - "type": "github" - } - }, - "yants": { - "inputs": { - "nixpkgs": [ - "std-ext", - "flops", - "dmerge", - "nixlib" - ] - }, - "locked": { - "lastModified": 1677285314, - "narHash": "sha256-hlAcg2514zKrPu8jn24BUsIjjvXvCLdw1jvKgBTpqko=", - "owner": "divnix", - "repo": "yants", - "rev": "9eab24b273ce021406c852166c216b86e2bb4ec4", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "yants", - "type": "github" - } - }, - "yants_2": { - "inputs": { - "nixpkgs": "nixpkgs_4" - }, - "locked": { - "lastModified": 1677285314, - "narHash": "sha256-hlAcg2514zKrPu8jn24BUsIjjvXvCLdw1jvKgBTpqko=", - "owner": "divnix", - "repo": "yants", - "rev": "9eab24b273ce021406c852166c216b86e2bb4ec4", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "yants", - "type": "github" - } - }, - "yants_3": { - "inputs": { - "nixpkgs": [ - "std-ext", - "std", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1667096281, - "narHash": "sha256-wRRec6ze0gJHmGn6m57/zhz/Kdvp9HS4Nl5fkQ+uIuA=", - "owner": "divnix", - "repo": "yants", - "rev": "d18f356ec25cb94dc9c275870c3a7927a10f8c3c", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "yants", - "type": "github" + "nixpkgs-julia": "nixpkgs-julia" } } }, diff --git a/flake.nix b/flake.nix index f5a009e..54a0866 100644 --- a/flake.nix +++ b/flake.nix @@ -1,56 +1,35 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - nix-filter.url = "github:/numtide/nix-filter"; - # TOOD: use the locked prefetch version, will be removed by replacing with nix-prefetch-url - nixpkgs-lock.url = "github:NixOS/nixpkgs/0cfb3c002b61807ca0bab3efe514476bdf2e5478"; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nixpkgs-julia.url = "github:NixOS/nixpkgs/?ref=refs/pull/225513/head"; + call-flake.url = "github:divnix/call-flake"; }; - - inputs = { - std-ext.url = "github:gtrunsec/std-ext"; - std.follows = "std-ext/std"; - std-data-collection.follows = "std-ext/std-data-collection"; - }; - - outputs = { - self, - std, - ... - } @ inputs: - (std.growOn { - inherit inputs; - cellsFrom = ./nix; - systems = [ - "aarch64-darwin" - "aarch64-linux" - "x86_64-darwin" - "x86_64-linux" - ]; - cellBlocks = with std.blockTypes; [ - (installables "packages") - - (nixago "nixago") - - (runnables "entrypoints") - - (devshells "devshells") - (functions "devshellProfiles") - - (functions "lib") - (functions "workflow") - (functions "overlays") - (functions "compiler") - - (data "containerJobs") - ]; - } - { - lib = std.harvest inputs.self ["julia2nix" "lib"]; - devShells = std.harvest inputs.self ["julia2nix" "devshells"]; - overlays = (std.harvest inputs.self ["julia2nix" "overlays"]).x86_64-linux; - packages = std.harvest inputs.self ["julia2nix" "packages"]; - }) - { + outputs = + inputs: + let + std = inputs.call-flake ./nix/std; + eachSystem = inputs.nixpkgs.lib.genAttrs [ + "x86_64-linux" + "x86_64-darwin" + "aarch64-linux" + "aarch64-darwin" + ]; + units = std.inputs.omnibus.inputs.flops.lib.haumea.pops.default.setInit { + src = ./nix/units; + inputs = { + inputs = std.inputs // inputs; + }; + }; + in + (eachSystem (system: std.${system})) + // { + inherit units; + inherit (std) + lib + packages + devShells + overlays + ; templates = { devshell = { description = "The devshell template which contains several Julia Packages"; diff --git a/julia2nix.toml b/julia2nix.toml index 3eccf41..411fbeb 100644 --- a/julia2nix.toml +++ b/julia2nix.toml @@ -29,11 +29,11 @@ sha256 = "sha256-27PVVCJaJplznvzgGGwQE3ksOuaUarHOYmDfMKSbUug=" stripRoot = false url = "https://pkg.julialang.org/artifact/dc526f26fb179a3f68eb13fcbe5d2d2a5aa7eeac#artifact.tar.gz" -[depot.x86_64-linux.fetchzip.package-OpenSSL] -name = "packages/OpenSSL/kra0W" -sha256 = "sha256-muCjqNy2lqSc78Tzv7q4G9vsYHNcv+olkqf8j1CbGiQ=" +[depot.x86_64-linux.fetchzip.registry-General] +name = "registries/General" +sha256 = "sha256-TAtVB22NVCRBJyHR3H2owLZLpGo8pq65hTqxxXaYt14=" stripRoot = false -url = "https://pkg.julialang.org/package/4d8831e6-92b7-49fb-bdf8-b643e874388c/df6830e37943c7aaa10023471ca47fb3065cc3c4#package.tar.gz" +url = "https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/baadbc3ca6fd7b55dedd2b64fef79efa5146474e#registry.tar.gz" [depot.x86_64-linux.fetchzip.artifact-33c5e3a13ad6427f86436f577c0edce1e468ac80] name = "artifacts/33c5e3a13ad6427f86436f577c0edce1e468ac80" @@ -41,12 +41,6 @@ sha256 = "sha256-yHv+b8WLS2yJKgp6tbVsvEtiki5DNBKGuXiNaRjo+Oo=" stripRoot = false url = "https://pkg.julialang.org/artifact/33c5e3a13ad6427f86436f577c0edce1e468ac80#artifact.tar.gz" -[depot.x86_64-linux.fetchzip.registry-General] -name = "registries/General" -sha256 = "sha256-NQM4+e9O5BFdeeqsr8OMKnFDdRIy79zOQjPOpdR83es=" -stripRoot = false -url = "https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/aa3b04713a506a40072b9f0f5f83ab8d80f560bc#registry.tar.gz" - [depot.x86_64-linux.fetchzip.artifact-53037ac9d528ee46c3526799b407ee52b7c224f3] name = "artifacts/53037ac9d528ee46c3526799b407ee52b7c224f3" sha256 = "sha256-nwKbETHxBT7fWziDE/6u+ZJvS/ULH7ewT2llzACAtps=" @@ -95,6 +89,12 @@ sha256 = "sha256-OdydL0kBs0anNG3UFioPiYbElCc/nohJutG/gKFhwUw=" rev = "6466e524967496866901a78fca3f2e9ea445a559" url = "https://github.com/JuliaData/Parsers.jl.git" +[depot.x86_64-linux.fetchgit.package-OpenSSL] +name = "packages/OpenSSL/kra0W" +sha256 = "sha256-muCjqNy2lqSc78Tzv7q4G9vsYHNcv+olkqf8j1CbGiQ=" +rev = "df6830e37943c7aaa10023471ca47fb3065cc3c4" +url = "https://github.com/JuliaWeb/OpenSSL.jl.git" + [depot.x86_64-linux.fetchgit.package-MbedTLS] name = "packages/MbedTLS/lqmet" sha256 = "sha256-X0cj/771qRxyVLloNLlhtrQkKKcVWlQxmqxSGVMYCII=" diff --git a/nix/julia2nix/compiler/default.nix b/nix/julia2nix/compiler/default.nix deleted file mode 100644 index aa49c70..0000000 --- a/nix/julia2nix/compiler/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - inputs, - cell, -}: { -} diff --git a/nix/julia2nix/devshellProfiles/nightly.nix b/nix/julia2nix/devshellProfiles/nightly.nix deleted file mode 100644 index e76fc68..0000000 --- a/nix/julia2nix/devshellProfiles/nightly.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - inputs, - cell, -}: { - config, - lib, - pkgs, - ... -}: { - commands = lib.optionals (pkgs.system != "x86_64-darwin") [ - { - name = "julia-nightly"; - command = "${cell.packages.julia_nightly-bin}/bin/julia"; - help = "julia nightly version"; - } - ]; -} diff --git a/nix/julia2nix/entrypoints/default.nix b/nix/julia2nix/entrypoints/default.nix deleted file mode 100644 index 8db7c8a..0000000 --- a/nix/julia2nix/entrypoints/default.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ - inputs, - cell, -}: let - inherit (inputs.std-ext.writers.lib) writeShellApplication; - inherit (inputs) nixpkgs; -in { - mkdoc = let - juliaDoc = cell.lib.buildEnv { - name = "julia-doc"; - src = ./doc; - package = cell.lib.julia-wrapped { - package = cell.packages.julia_19-bin; - }; - }; - in - writeShellApplication { - name = "mkdoc"; - runtimeInputs = [ - # juliaDoc - nixpkgs.julia_19-bin - ]; - text = '' - julia --project="$*" -e 'using Pkg; Pkg.develop(PackageSpec(; path=pwd())); Pkg.instantiate();' - julia --project="$*" "$*"/make.jl deploy - # find "$*" -type l -exec bash ${./fix-symlink.sh} {} + - ''; - }; - - ion = let - julia-ion = - (cell.lib.buildEnv { - name = "julia-ion"; - src = ./ion; - extraDepot = { - extraJulia2nix = { - fetchzip.artifact-1fce04a1a7eedfdf2b0b81ca9001494525764e11 = { - name = "artifacts/1fce04a1a7eedfdf2b0b81ca9001494525764e11"; - sha256 = "sha256-YlrXTPJLJGjHLjoVkuygwtTV6kFUIO2VHZXwf3COIt0="; - stripRoot = false; - url = "https://pkg.julialang.org/artifact/1fce04a1a7eedfdf2b0b81ca9001494525764e11#artifact.tar.gz"; - }; - }; - }; - package = cell.lib.julia-wrapped { - package = cell.packages.julia_19-bin; - }; - }) - .overrideAttrs (old: { - buildInputs = old.buildInputs ++ [nixpkgs.rsync]; - postInstall = '' - - $out/bin/julia -e 'using Ion; Ion.comonicon_install()'; - # make sure we can write the ./julia/bin/* in our $out/store - rsync -avzhr $HOME/.julia/ $out - ''; - }); - in - writeShellApplication { - name = "julia-ion"; - runtimeInputs = [ - julia-ion - ]; - text = '' - ion "$@" - ''; - }; -} diff --git a/nix/julia2nix/lib/default.nix b/nix/julia2nix/lib/default.nix deleted file mode 100644 index 854f162..0000000 --- a/nix/julia2nix/lib/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - inputs, - cell, -}: let - nixpkgs = inputs.nixpkgs.appendOverlays [ - cell.overlays.default - ]; -in { - inherit (nixpkgs.lib) installBin installApp buildDepot buildEnv buildProject julia-wrapped; - - /* - patches ["a" "b"] - */ - # patches = list: ; -} diff --git a/nix/julia2nix/overlays/builder/default.nix b/nix/julia2nix/overlays/builder/default.nix deleted file mode 100644 index 817e7e3..0000000 --- a/nix/julia2nix/overlays/builder/default.nix +++ /dev/null @@ -1,113 +0,0 @@ -{ - stdenv, - julia_19-bin, - runCommand, - makeWrapper, - lib, - ... -}: { - package ? julia_19-bin, - extraLibs ? [], - src, - importManifest ? src + "/Manifest.toml", - importProject ? src + "/Project.toml", - extraBuildInputs ? [], - julia2nix ? src + "/julia2nix.toml", - precompile ? true, - extraInstallPhase ? "", - extraStartup ? "", - makeWrapperArgs ? [], - extraDepot ? {}, - saveRegistry ? false, - ... -} @ args: let - # Extra libraries for Julia's LD_LIBRARY_PATH. - # Recent Julia packages that use Artifacts.toml to specify their dependencies - # shouldn't need this. - # But if a package implicitly depends on some library being present at runtime, you can - # add it here. - # extraLibs = [ ]; - # Wrapped Julia with libraries and environment variables. - # Note: setting The PYTHON environment variable is recommended to prevent packages - # from trying to obtain their own with Conda. - depotPath = lib.buildDepot (lib.recursiveUpdate {inherit julia2nix;} extraDepot); -in - stdenv.mkDerivation { - name = (lib.importTOML importProject).name or args.name; - buildInputs = [makeWrapper] ++ extraBuildInputs; - inherit src precompile makeWrapperArgs depotPath; - - preInstall = '' - mkdir -p $out - mkdir -p $out/config - - export HOME=$(pwd) - echo "Copying dependencies" - export JULIA_DEPOT_PATH=$out - cp -rf --no-preserve=mode,ownership ${depotPath}/packages $out - if [ -d "${depotPath}/artifacts" ]; then - cp -rf --no-preserve=mode,ownership ${depotPath}/artifacts $out - fi - - cp -rf --no-preserve=mode,ownership ${importProject} Project.toml - cp -rf --no-preserve=mode,ownership ${importManifest} Manifest.toml - - cat > $out/startup.jl < $out/startup.jl < $out/${path}/deps/deps.jl < { }; in with pkgs; $(fetcher.name) """ cmd = `nix-prefetch $expr $(parsed)` diff --git a/templates/dev/flake.nix b/templates/dev/flake.nix index 15c13eb..0240791 100644 --- a/templates/dev/flake.nix +++ b/templates/dev/flake.nix @@ -12,14 +12,11 @@ julia2nix.url = "github:JuliaCN/Julia2Nix.jl"; }; - outputs = inputs @ { - self, - julia2nix, - ... - }: - ( - inputs.flake-utils.lib.eachDefaultSystem - (system: let + outputs = + inputs@{ self, julia2nix, ... }: + (inputs.flake-utils.lib.eachDefaultSystem ( + system: + let pkgs = inputs.nixpkgs.legacyPackages.${system}.appendOverlays [ inputs.devshell.overlays.default self.overlays.default @@ -30,12 +27,14 @@ enable = { # only x86_64-linux is supported GR = true; - python = - pkgs.python3.buildEnv.override - { - extraLibs = with pkgs.python3Packages; [xlrd matplotlib pyqt5]; - # ignoreCollisions = true; - }; + python = pkgs.python3.buildEnv.override { + extraLibs = with pkgs.python3Packages; [ + xlrd + matplotlib + pyqt5 + ]; + # ignoreCollisions = true; + }; }; }; @@ -46,7 +45,8 @@ name = "your julia project"; package = julia-wrapped; }; - in { + in + { packages = { # make sure you have generated the julia2nix.toml # default = project; @@ -69,9 +69,9 @@ } ]; }; - }) - ) + } + )) // { - overlays.default = final: prev: {}; + overlays.default = final: prev: { }; }; } diff --git a/templates/jlrs/default.nix b/templates/jlrs/default.nix index 0205bc8..75bed34 100644 --- a/templates/jlrs/default.nix +++ b/templates/jlrs/default.nix @@ -3,12 +3,10 @@ let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in - fetchTarball { - url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; - sha256 = lock.nodes.flake-compat.locked.narHash; - } + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } ) - { - src = ./.; - }) -.defaultNix + { src = ./.; } +).defaultNix diff --git a/templates/jlrs/devshell/default.nix b/templates/jlrs/devshell/default.nix index 741033b..16e3874 100644 --- a/templates/jlrs/devshell/default.nix +++ b/templates/jlrs/devshell/default.nix @@ -1,12 +1,9 @@ +{ inputs, pkgs }: { - inputs, - pkgs, -}: { - default = with pkgs; + default = + with pkgs; devshell.mkShell { - imports = [ - (devshell.importTOML ./commands.toml) - ]; + imports = [ (devshell.importTOML ./commands.toml) ]; packages = [ pkgs.rust-final diff --git a/templates/jlrs/flake.nix b/templates/jlrs/flake.nix index f8aae7d..af72c65 100644 --- a/templates/jlrs/flake.nix +++ b/templates/jlrs/flake.nix @@ -25,89 +25,103 @@ jlrs.flake = false; }; - outputs = inputs @ { - self, - nixpkgs, - flake-utils, - ... - }: - ( - flake-utils.lib.eachSystem ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"] (system: let - pkgs = nixpkgs.legacyPackages.${system}.appendOverlays [ - self.overlays.default - inputs.rust-overlay.overlays.default - inputs.devshell.overlays.default - ]; + outputs = + inputs@{ + self, + nixpkgs, + flake-utils, + ... + }: + (flake-utils.lib.eachSystem + [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ] + ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}.appendOverlays [ + self.overlays.default + inputs.rust-overlay.overlays.default + inputs.devshell.overlays.default + ]; - craneLib = (inputs.crane.mkLib pkgs).overrideScope' (final: prev: { - rustc = pkgs.rust-final; - cargo = pkgs.rust-final; - rustfmt = pkgs.rust-final; - }); - julia-wrapped = inputs.julia2nix.lib.${system}.julia-wrapped { - package = inputs.julia2nix.packages.${system}.julia_17-bin; - enable = { - python = - pkgs.python3.buildEnv.override - { - extraLibs = with pkgs.python3Packages; [matplotlib pyqt5]; + craneLib = (inputs.crane.mkLib pkgs).overrideScope' ( + final: prev: { + rustc = pkgs.rust-final; + cargo = pkgs.rust-final; + rustfmt = pkgs.rust-final; + } + ); + julia-wrapped = inputs.julia2nix.lib.${system}.julia-wrapped { + package = inputs.julia2nix.packages.${system}.julia_17-bin; + enable = { + python = pkgs.python3.buildEnv.override { + extraLibs = with pkgs.python3Packages; [ + matplotlib + pyqt5 + ]; ignoreCollisions = true; }; + }; }; - }; - build-package = inputs.julia2nix.lib.${system}.buildEnv { - src = inputs.nix-filter.lib.filter { - root = ./.; - include = [ - ./julia2nix.toml - ./Project.toml - ./Manifest.toml - ]; + build-package = inputs.julia2nix.lib.${system}.buildEnv { + src = inputs.nix-filter.lib.filter { + root = ./.; + include = [ + ./julia2nix.toml + ./Project.toml + ./Manifest.toml + ]; + }; + name = "Plot-PackageDeps"; + package = julia-wrapped; }; - name = "Plot-PackageDeps"; - package = julia-wrapped; - }; - plot = craneLib.buildPackage { - src = inputs.nix-filter.lib.filter { - root = ./.; - include = [ - (inputs.nix-filter.lib.inDirectory ./src) - ./Cargo.toml - ./Cargo.lock - ]; + plot = craneLib.buildPackage { + src = inputs.nix-filter.lib.filter { + root = ./.; + include = [ + (inputs.nix-filter.lib.inDirectory ./src) + ./Cargo.toml + ./Cargo.lock + ]; + }; + # cargoExtraArgs = "--target wasm32-wasi"; + # Tests currently need to be run via `cargo wasi` which + # isn't packaged in nixpkgs yet... + doCheck = false; + JULIA_DIR = julia-wrapped; }; - # cargoExtraArgs = "--target wasm32-wasi"; - # Tests currently need to be run via `cargo wasi` which - # isn't packaged in nixpkgs yet... - doCheck = false; - JULIA_DIR = julia-wrapped; - }; - call-julia = craneLib.buildPackage { - src = inputs.nix-filter.lib.filter { - root = ./call_julia; - include = [ - (inputs.nix-filter.lib.inDirectory ./call_julia) - ./julia2nix.toml - ./Project.toml - ./Manifest.toml - ./Cargo.toml - ./Cargo.lock - ]; + call-julia = craneLib.buildPackage { + src = inputs.nix-filter.lib.filter { + root = ./call_julia; + include = [ + (inputs.nix-filter.lib.inDirectory ./call_julia) + ./julia2nix.toml + ./Project.toml + ./Manifest.toml + ./Cargo.toml + ./Cargo.lock + ]; + }; + doCheck = true; + JULIA_DIR = julia-wrapped; }; - doCheck = true; - JULIA_DIR = julia-wrapped; - }; - in { - packages = { - default = plot; - julia = julia-wrapped; - inherit build-package call-julia; - }; - devShells = import ./devshell {inherit inputs pkgs;}; - }) + in + { + packages = { + default = plot; + julia = julia-wrapped; + inherit build-package call-julia; + }; + devShells = import ./devshell { inherit inputs pkgs; }; + } + ) ) // { - overlays = import ./nix/overlays.nix {inherit inputs;}; + overlays = import ./nix/overlays.nix { inherit inputs; }; }; } diff --git a/templates/jlrs/nix/overlays.nix b/templates/jlrs/nix/overlays.nix index 93bfe54..29a47a6 100644 --- a/templates/jlrs/nix/overlays.nix +++ b/templates/jlrs/nix/overlays.nix @@ -1,7 +1,8 @@ -{inputs}: { +{ inputs }: +{ default = final: prev: { rust-final = final.rust-bin.stable.latest.default.override { - extensions = ["rust-src"]; + extensions = [ "rust-src" ]; }; }; }