Skip to content

Commit

Permalink
fix: revert separation of build and native build inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorwhitney committed Mar 20, 2024
1 parent 303a5f1 commit 84787f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 7 additions & 1 deletion nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@
promtail = loki.overrideAttrs (oldAttrs: {
pname = "promtail";

buildInputs = if prev.stdenv.hostPlatform.isLinux then oldAttrs.buildInputs ++ [ prev.systemd prev.systemdLibs ] else oldAttrs.buildInputs;
buildInputs =
let
inherit (oldAttrs) buildInputs;
in
if prev.stdenv.hostPlatform.isLinux then
buildInputs ++ (with prev; [ systemd ])
else buildInputs;

buildPhase = ''
export GOCACHE=$TMPDIR/go-cache
Expand Down
7 changes: 2 additions & 5 deletions nix/packages/loki.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,11 @@ pkgs.stdenv.mkDerivation {

src = ./../..;

nativeBuildInputs = with pkgs; [
gcc
go
];

buildInputs = with pkgs; [
bash
gcc
git
go
golangci-lint
nettools
yamllint
Expand Down

0 comments on commit 84787f5

Please sign in to comment.