From 2a910c9bcf1f1f02857eb0f1f64e88befc035ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amy=20de=20Buitl=C3=A9ir?= Date: Sat, 6 Sep 2025 18:26:28 +0100 Subject: [PATCH] temp --- .../devshell/env-var/tempwork/flake.lock | 60 -------- .../devshell/flake/tempwork/flake.lock | 128 ++++++++++++++++++ .../{env-var => flake}/tempwork/flake.nix | 7 +- source/recipes/devshell/main.adoc | 1 + source/recipes/shebang/main.adoc | 1 - 5 files changed, 132 insertions(+), 65 deletions(-) delete mode 100644 source/recipes/devshell/env-var/tempwork/flake.lock create mode 100644 source/recipes/devshell/flake/tempwork/flake.lock rename source/recipes/devshell/{env-var => flake}/tempwork/flake.nix (63%) diff --git a/source/recipes/devshell/env-var/tempwork/flake.lock b/source/recipes/devshell/env-var/tempwork/flake.lock deleted file mode 100644 index 73a8aba..0000000 --- a/source/recipes/devshell/env-var/tempwork/flake.lock +++ /dev/null @@ -1,60 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1757177463, - "narHash": "sha256-+0iaqsEjfaIZMuRNGO+wC0uVazT5b+W38wB7Uv0kA5Y=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9aaf71a4a74d835ec05ac3ddf5fc1b859e005c41", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/source/recipes/devshell/flake/tempwork/flake.lock b/source/recipes/devshell/flake/tempwork/flake.lock new file mode 100644 index 0000000..66157b4 --- /dev/null +++ b/source/recipes/devshell/flake/tempwork/flake.lock @@ -0,0 +1,128 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1681202837, + "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "hello-flake": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1684524031, + "narHash": "sha256-0DYX7S7u5S2no2e6jiIv7cRfbpM5JBJq7+/1CUKEGxA=", + "ref": "refs/heads/main", + "rev": "099bfadc43f79a8929809bd097d12ef5de73ef62", + "revCount": 24, + "type": "git", + "url": "https://codeberg.org/mhwombat/hello-flake" + }, + "original": { + "type": "git", + "url": "https://codeberg.org/mhwombat/hello-flake" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1681665000, + "narHash": "sha256-hDGTR59wC3qrQZFxVi2U3vTY+r02+Okbq080hO1C4Nk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3a6205d9f79fe526be03d8c465403b118ca4cf37", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1757177463, + "narHash": "sha256-+0iaqsEjfaIZMuRNGO+wC0uVazT5b+W38wB7Uv0kA5Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9aaf71a4a74d835ec05ac3ddf5fc1b859e005c41", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "hello-flake": "hello-flake", + "nixpkgs": "nixpkgs_2" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/source/recipes/devshell/env-var/tempwork/flake.nix b/source/recipes/devshell/flake/tempwork/flake.nix similarity index 63% rename from source/recipes/devshell/env-var/tempwork/flake.nix rename to source/recipes/devshell/flake/tempwork/flake.nix index 7d462f8..0db427b 100644 --- a/source/recipes/devshell/env-var/tempwork/flake.nix +++ b/source/recipes/devshell/flake/tempwork/flake.nix @@ -2,9 +2,10 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; + hello-flake.url = "git+https://codeberg.org/mhwombat/hello-flake"; }; - outputs = { self, nixpkgs, flake-utils }: + outputs = { self, nixpkgs, flake-utils, hello-flake }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; @@ -12,9 +13,7 @@ { devShells = rec { default = pkgs.mkShell { - shellHook = '' - export FOO="bar" - ''; + buildInputs = [ hello-flake.packages.${system}.hello ]; }; }; } diff --git a/source/recipes/devshell/main.adoc b/source/recipes/devshell/main.adoc index 25c9f26..88c9206 100644 --- a/source/recipes/devshell/main.adoc +++ b/source/recipes/devshell/main.adoc @@ -10,3 +10,4 @@ include::haskell-flake/main-generated.adoc[leveloffset=+1] include::env-var/main-generated.adoc[leveloffset=+1] +/// TODO non-flake/main-generated.adoc diff --git a/source/recipes/shebang/main.adoc b/source/recipes/shebang/main.adoc index c1d2ea6..a9265de 100644 --- a/source/recipes/shebang/main.adoc +++ b/source/recipes/shebang/main.adoc @@ -8,7 +8,6 @@ The script should start with two _"shebang"_ (`#!`) commands. The first should invoke `nix`. The second should declares the script interpreter and any dependencies. - include::nixpkg/main-generated.adoc[leveloffset=+1] include::flake/main-generated.adoc[leveloffset=+1]