Skip to content

Commit

Permalink
packaging-nix: fix broken git+file:. input
Browse files Browse the repository at this point in the history
The `src` input was working locally due to a bug in the `nix` flake
evaluation. The input itself was malformed and not reproducable.

Signed-off-by: Philipp Jungkamp <[email protected]>
  • Loading branch information
pjungkamp committed May 25, 2023
1 parent 1fb9a89 commit 58dbd91
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 24 deletions.
2 changes: 1 addition & 1 deletion packaging/nix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Here is a more complete `flake.nix` containing `devShells` available to
jq
bat
];
}
};
};
}
```
Expand Down
41 changes: 21 additions & 20 deletions packaging/nix/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions packaging/nix/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";

src = {
url = "git+file:.?submodules=1";
common = {
url = "github:VILLASframework/common?submodules=1";
flake = false;
};

Expand Down Expand Up @@ -43,7 +43,8 @@
default = villas;

villas-minimal = pkgs.callPackage ./villas.nix {
inherit (inputs) src;
src = ../..;
common = inputs.common;
};

villas = villas-minimal.override {
Expand Down
4 changes: 4 additions & 0 deletions packaging/nix/villas.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
# build dependencies
cmake,
common,
lib,
makeWrapper,
pkg-config,
Expand Down Expand Up @@ -61,6 +62,9 @@ stdenv.mkDerivation {
# 'array-bounds' and 'stringop-overflow' for villas-relay
"-DCMAKE_CXX_FLAGS_RELEASE=-Wno-error"
];
preConfigure = ''
rm -d common && ln -sf ${common} common
'';
postInstall = ''
wrapProgram $out/bin/villas \
--set PATH ${lib.makeBinPath [(placeholder "out") gnugrep]}
Expand Down

0 comments on commit 58dbd91

Please sign in to comment.