Skip to content

Commit f64da89

Browse files
committed
nix: Specify dependencies a little bit more accurately
This shouldn't make a real difference but makes this a little bit more explicit and maybe even more robust.
1 parent 5d3a844 commit f64da89

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

default.nix

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ pkgs.stdenvNoCC.mkDerivation rec {
3333
# The single source of truth for the version number is stored in `pom.xml`.
3434
# Hence, this XML file needs to be parsed to extract the current version.
3535
version = pkgs.lib.removeSuffix "\n" (pkgs.lib.readFile
36-
(pkgs.runCommandLocal "DiffDetective-version" {}
37-
"${pkgs.xq-xml}/bin/xq -x '/project/version' ${./pom.xml} > $out"));
36+
(pkgs.runCommandLocal "DiffDetective-version" {
37+
nativeBuildInputs = [pkgs.xq-xml];
38+
} "xq -x '/project/version' ${./pom.xml} > $out"));
3839
src = with pkgs.lib.fileset;
3940
toSource {
4041
root = ./.;
@@ -44,12 +45,15 @@ pkgs.stdenvNoCC.mkDerivation rec {
4445
nativeBuildInputs = [
4546
pkgs.maven
4647
pkgs.makeWrapper
47-
pkgs.graphviz
4848
] ++ pkgs.lib.optional buildGitHubPages (pkgs.ruby.withPackages (rubyPkgs: [
4949
rubyPkgs.github-pages
5050
rubyPkgs.jekyll-theme-cayman
5151
]));
5252

53+
nativeCheckInputs = [
54+
pkgs.graphviz
55+
];
56+
5357
# Maven needs to download necessary dependencies which is impure because it
5458
# requires network access. Hence, we download all dependencies as a
5559
# fixed-output derivation. This also serves as a nice cache.

0 commit comments

Comments
 (0)