Hey there. I’ve been trying to make a flake for one of my projects, but for some reason when i try running it with nix run
i get a file not found error that looks something like this:
[nix-shell:~/grosh]$ nix run
error: unable to execute '/nix/store/26851x0yb8wq6fjw5llbh7ic02m9785x-grosh/bin/grosh': No such file or directory
This is how my project is laid out:
├── flake.lock
├── flake.nix
├── meson.build
└── src
├── meson.build
└── shell.c
and this is my attempt at a flake.nix
{
description = "A flake for building the grosh shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system}; in
{
packages = rec {
Grosh = pkgs.stdenv.mkDerivation rec {
name = "grosh";
version = "0.0.1";
src = ./.;
propagatedBuildInputs = with pkgs; [
meson
ninja
pkg-config
];
};
default = Grosh;
};
apps = rec {
shell_app = flake-utils.lib.mkApp {
drv = self.packages.${system}.Grosh;
name = "grosh";
};
default = shell_app;
};
}
);
}