[#devshell-nix-non-flake] = Access a non-flake package (not in nixpkgs) //// $ mkdir tempwork $ cd tempwork $ cp ../flake.nix flake.nix $ git add flake.nix $ nix develop $ git add flake.lock $ git commit -a -m temp //// In this example, we will use a nix package (not a flake) defined in a remote git repo. However, you can use any of the flake reference styles defined in <<#flakeref>>. The `hello-nix` https://codeberg.org/mhwombat/hello-nix[repo] provides a `default.nix`. If the derivation in that file allows us to supply our own package set, then our flake can call it to build `hello nix`. If instead it requires ``, it is not pure and we cannot use it. For example, if the file begins with an expression such as [source,nix] .... with (import {}); .... then it requires `nixpkgs` so we cannot use it. Instead, we have to write our own derivation (see <>). Fortunately the file begins with [source,nix] .... { pkgs ? import {} }: .... then it accepts a package set as an argument, only using `` if no argument is provided. We can use it directly to build `hello-nix` (see <>). [#devshell-pure] == If the nix derivation does not require nixpkgs [source,nix,linenums,highlight='5..8,17'] .flake.nix .... $# cat flake.nix .... Lines 5-8 fetches the git repo for `hello-nix`. However, it is not a flake, so we have to build it; this is done in line 15. Here's a demonstration using the shell. .... $ hello-nix # Fails outside development shell $# start-shell nix develop <