Skip to content

Commit

Permalink
Cleanup deps
Browse files Browse the repository at this point in the history
- `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.
  • Loading branch information
Ericson2314 committed Nov 30, 2023
1 parent 8f48e4d commit 5db374c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ $ nix-build
You can use the provided shell.nix to get a working development environment:
```
$ nix-shell
$ ./bootstrap
$ autoreconfPhase
$ configurePhase # NOTE: not ./configure
$ make
```
Expand Down
2 changes: 0 additions & 2 deletions bootstrap

This file was deleted.

31 changes: 17 additions & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,11 @@

};

hydra = with final; let
perlDeps = buildEnv {
hydra = let
inherit (final) lib stdenv;
perlDeps = final.buildEnv {
name = "hydra-perl-deps";
paths = with perlPackages; lib.closePropagation
paths = with final.perlPackages; lib.closePropagation
[
AuthenSASL
CatalystActionREST
Expand Down Expand Up @@ -98,7 +99,7 @@
FileSlurper
FileWhich
final.nix.perl-bindings
git
final.git
IOCompress
IPCRun
IPCRun3
Expand Down Expand Up @@ -141,15 +142,20 @@

src = self;

buildInputs =
[
nativeBuildInputs =
with final.buildPackages; [
makeWrapper
autoconf
autoreconfHook
automake
libtool
unzip
nukeReferences
pkg-config
mdbook
];

buildInputs =
with final; [
unzip
libpqxx
top-git
mercurial
Expand All @@ -162,7 +168,6 @@
final.nix
perlDeps
perl
mdbook
pixz
boost
postgresql_13
Expand All @@ -172,7 +177,7 @@
prometheus-cpp
];

checkInputs = [
checkInputs = with final; [
cacert
foreman
glibcLocales
Expand All @@ -181,7 +186,7 @@
python3
];

hydraPath = lib.makeBinPath (
hydraPath = with final; lib.makeBinPath (
[
subversion
openssh
Expand All @@ -203,7 +208,7 @@
] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ]
);

OPENLDAP_ROOT = openldap;
OPENLDAP_ROOT = final.openldap;

shellHook = ''
pushd $(git rev-parse --show-toplevel) >/dev/null
Expand All @@ -218,8 +223,6 @@
popd >/dev/null
'';

preConfigure = "autoreconf -vfi";

NIX_LDFLAGS = [ "-lpthread" ];

enableParallelBuilding = true;
Expand Down

0 comments on commit 5db374c

Please sign in to comment.