Skip to content

Commit

Permalink
Fix nix-flake-check warning
Browse files Browse the repository at this point in the history
Before, getting:

```
$ nix flake check
trace: warning: getExe: Package bpftrace does not have the
meta.mainProgram attribute. We'll assume that the main program has the
same name for now, but this behavior is deprecated, because it leads to
surprising errors when the assumption does not hold. If the package has
a main program, please set `meta.mainProgram` in its definition to make
this warning go away. Otherwise, if the package does not have a main
program, or if you don't control its definition, use getExe' to specify
the name to the program, such as lib.getExe' foo "bar".
```

Fix by providing metadata.
  • Loading branch information
danobi authored and viktormalik committed Jan 3, 2024
1 parent 471035f commit ba15104
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
];

# Technically not needed cuz package name matches mainProgram, but
# explicit is fine too.
meta.mainProgram = "bpftrace";
};

# Define lambda that returns a devShell derivation with extra test-required packages
Expand Down

0 comments on commit ba15104

Please sign in to comment.