Cleanup deps

- `nativeBuildInputs` vs `buildInputs`

- narrow down `with`s for clarity

- use `autoreconfHook` not `bootstrap` script

These sorts of changes have also been done in the Nix repo.
This commit is contained in:
John Ericson 2023-11-30 10:40:57 -05:00
parent 8f48e4ddec
commit 5db374cb50
3 changed files with 18 additions and 17 deletions

View file

@ -80,7 +80,7 @@ $ nix-build
You can use the provided shell.nix to get a working development environment: You can use the provided shell.nix to get a working development environment:
``` ```
$ nix-shell $ nix-shell
$ ./bootstrap $ autoreconfPhase
$ configurePhase # NOTE: not ./configure $ configurePhase # NOTE: not ./configure
$ make $ make
``` ```

View file

@ -1,2 +0,0 @@
#! /bin/sh -e
exec autoreconf -vfi

View file

@ -61,10 +61,11 @@
}; };
hydra = with final; let hydra = let
perlDeps = buildEnv { inherit (final) lib stdenv;
perlDeps = final.buildEnv {
name = "hydra-perl-deps"; name = "hydra-perl-deps";
paths = with perlPackages; lib.closePropagation paths = with final.perlPackages; lib.closePropagation
[ [
AuthenSASL AuthenSASL
CatalystActionREST CatalystActionREST
@ -98,7 +99,7 @@
FileSlurper FileSlurper
FileWhich FileWhich
final.nix.perl-bindings final.nix.perl-bindings
git final.git
IOCompress IOCompress
IPCRun IPCRun
IPCRun3 IPCRun3
@ -141,15 +142,20 @@
src = self; src = self;
buildInputs = nativeBuildInputs =
[ with final.buildPackages; [
makeWrapper makeWrapper
autoconf autoreconfHook
automake automake
libtool libtool
unzip
nukeReferences nukeReferences
pkg-config pkg-config
mdbook
];
buildInputs =
with final; [
unzip
libpqxx libpqxx
top-git top-git
mercurial mercurial
@ -162,7 +168,6 @@
final.nix final.nix
perlDeps perlDeps
perl perl
mdbook
pixz pixz
boost boost
postgresql_13 postgresql_13
@ -172,7 +177,7 @@
prometheus-cpp prometheus-cpp
]; ];
checkInputs = [ checkInputs = with final; [
cacert cacert
foreman foreman
glibcLocales glibcLocales
@ -181,7 +186,7 @@
python3 python3
]; ];
hydraPath = lib.makeBinPath ( hydraPath = with final; lib.makeBinPath (
[ [
subversion subversion
openssh openssh
@ -203,7 +208,7 @@
] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] ] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ]
); );
OPENLDAP_ROOT = openldap; OPENLDAP_ROOT = final.openldap;
shellHook = '' shellHook = ''
pushd $(git rev-parse --show-toplevel) >/dev/null pushd $(git rev-parse --show-toplevel) >/dev/null
@ -218,8 +223,6 @@
popd >/dev/null popd >/dev/null
''; '';
preConfigure = "autoreconf -vfi";
NIX_LDFLAGS = [ "-lpthread" ]; NIX_LDFLAGS = [ "-lpthread" ];
enableParallelBuilding = true; enableParallelBuilding = true;