From afbccdf41b2316039b2e7c1db04314ec342a5097 Mon Sep 17 00:00:00 2001 From: Qyriad Date: Sat, 2 Mar 2024 18:09:56 -0700 Subject: [PATCH] package.nix: factor out buildInputs Change-Id: I52433bcb7f81f1114507757548f56d41ff1b0836 --- flake.nix | 12 +----------- package.nix | 36 ++++++++++++++++++++++++++++++++---- 2 files changed, 33 insertions(+), 15 deletions(-) diff --git a/flake.nix b/flake.nix index 4229642d3..c28b4d04d 100644 --- a/flake.nix +++ b/flake.nix @@ -178,17 +178,7 @@ inherit changelog-d; nativeBuildDeps = calledPackage.nativeBuildInputs; - buildDeps = - [ curl - bzip2 xz brotli editline - openssl sqlite - libarchive - boost - lowdown - libsodium - ] - ++ lib.optionals stdenv.isLinux [libseccomp] - ++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid; + buildDeps = calledPackage.buildInputs; checkDeps = [ gtest diff --git a/package.nix b/package.nix index 2a2457ac1..2344ac02f 100644 --- a/package.nix +++ b/package.nix @@ -6,16 +6,28 @@ autoreconfHook, bison, changelog-d, + boost, + brotli, + bzip2, + curl, + editline, fileset, flex, + git, + jq, + libarchive, + libcpuid, + libseccomp, + libsodium, lowdown, mdbook, mdbook-linkcheck, - - pkg-config, - git, mercurial, - jq, + openssl, + pkg-config, + sqlite, + util-linuxMinimal, + xz, pname ? "nix", versionSuffix ? "", @@ -84,4 +96,20 @@ in stdenv.mkDerivation (finalAttrs: { # FIXME(Qyriad): should this be util-linux as it is in current upstream? (buildPackages.util-linuxMinimal or buildPackages.utillinuxMinimal) ] ++ lib.optional (!officialRelease && buildUnreleasedNotes) changelog-d; + + buildInputs = [ + curl + bzip2 + xz + brotli + editline + openssl + sqlite + libarchive + boost + lowdown + libsodium + ] + ++ lib.optionals stdenv.isLinux [ libseccomp ] + ++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid; })