diff --git a/source/recipes/build/nix-non-flake/tempwork/hello-again b/source/recipes/build/nix-non-flake/tempwork/hello-again deleted file mode 100755 index 5315da4..0000000 --- a/source/recipes/build/nix-non-flake/tempwork/hello-again +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh - -echo "I'm a flake, but I'm running a command defined in a non-flake package." -hello-nix diff --git a/source/recipes/build/nix-non-flake/tempwork/flake.lock b/source/recipes/build/nixpkg/tempwork/flake.lock similarity index 73% rename from source/recipes/build/nix-non-flake/tempwork/flake.lock rename to source/recipes/build/nixpkg/tempwork/flake.lock index 4ae4a66..98266aa 100644 --- a/source/recipes/build/nix-non-flake/tempwork/flake.lock +++ b/source/recipes/build/nixpkg/tempwork/flake.lock @@ -18,22 +18,6 @@ "type": "github" } }, - "hello-nix": { - "flake": false, - "locked": { - "lastModified": 1757705465, - "narHash": "sha256-sJCQ9+8Dy+QF9ISaupp42+mGbuXtFyqbX85tWzeNPOI=", - "ref": "refs/heads/main", - "rev": "56044f61231c996e4ab795de1da89e5f79db3f4f", - "revCount": 5, - "type": "git", - "url": "https://codeberg.org/mhwombat/hello-nix" - }, - "original": { - "type": "git", - "url": "https://codeberg.org/mhwombat/hello-nix" - } - }, "nixpkgs": { "locked": { "lastModified": 1757775813, @@ -52,7 +36,6 @@ "root": { "inputs": { "flake-utils": "flake-utils", - "hello-nix": "hello-nix", "nixpkgs": "nixpkgs" } }, diff --git a/source/recipes/build/nix-non-flake/tempwork/flake.nix b/source/recipes/build/nixpkg/tempwork/flake.nix similarity index 50% rename from source/recipes/build/nix-non-flake/tempwork/flake.nix rename to source/recipes/build/nixpkg/tempwork/flake.nix index 53107d1..22b491d 100644 --- a/source/recipes/build/nix-non-flake/tempwork/flake.nix +++ b/source/recipes/build/nixpkg/tempwork/flake.nix @@ -2,24 +2,17 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; - hello-nix = { - url = "git+https://codeberg.org/mhwombat/hello-nix"; - flake = false; - }; }; - outputs = { self, nixpkgs, flake-utils, hello-nix }: + outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let - pkgs = import nixpkgs { - inherit system; - }; - helloNix = import hello-nix { inherit pkgs; }; + pkgs = import nixpkgs { inherit system; }; in { packages = rec { hello = pkgs.stdenv.mkDerivation rec { - name = "hello-again"; + name = "hello-flake"; src = ./.; @@ -30,16 +23,9 @@ installPhase = '' mkdir -p $out/bin - cp $src/hello-again $out/bin - chmod +x $out/bin/hello-again - - # modify the hello-again script so it can find hello-nix - HELLO=$(type -p hello-nix) - sed "s_hello-nix_"$HELLO"_" --in-place $out/bin/hello-again + cp $src/hello-flake $out/bin/hello-flake + chmod +x $out/bin/hello-flake ''; - - - buildInputs = [ helloNix ]; }; default = hello; }; diff --git a/source/recipes/build/nixpkg/tempwork/hello-with-cow b/source/recipes/build/nixpkg/tempwork/hello-with-cow new file mode 100644 index 0000000..82caecc --- /dev/null +++ b/source/recipes/build/nixpkg/tempwork/hello-with-cow @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +cowsay "Hello from your flake!"