refactor(ops): Consistent use of depot.third_party vs. pkgs

In preparation for the solution of b/108, we need to consistently use
`depot.third_party` for packages that are only packed in the TVL depot
and `pkgs` for things that come from nixpkgs.

This commit cleans up a huge chunk of these uses in //ops

Change-Id: I00faeb969eaa70760a26256274925b07998c2351
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2915
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2021-04-10 13:40:06 +02:00 committed by tazjin
parent d62fab4168
commit 9c5b5600ea
4 changed files with 13 additions and 16 deletions

View file

@ -1,11 +1,9 @@
{ depot, ... }: { depot, pkgs, ... }:
with depot.third_party; depot.third_party.naersk.buildPackage {
naersk.buildPackage {
src = ./.; src = ./.;
buildInputs = [ buildInputs = with pkgs; [
pkgconfig openssl systemd.dev pkgconfig openssl systemd.dev
]; ];
} }

View file

@ -1,4 +1,4 @@
# Copyright (C) 2016-2019 Vincent Ambo <mail@tazj.in> # Copyright (C) 2016-2021 Vincent Ambo <mail@tazj.in>
# #
# This file is part of Kontemplate. # This file is part of Kontemplate.
# #
@ -10,15 +10,15 @@
# This file is the Nix derivation used to install Kontemplate on # This file is the Nix derivation used to install Kontemplate on
# Nix-based systems. # Nix-based systems.
{ depot, ... }: { lib, pkgs, ... }:
with depot.third_party; buildGoPackage rec { pkgs.buildGoPackage rec {
name = "kontemplate-${version}"; name = "kontemplate-${version}";
version = "canon"; version = "canon";
src = ./.; src = ./.;
goPackagePath = "github.com/tazjin/kontemplate"; goPackagePath = "github.com/tazjin/kontemplate";
goDeps = ./deps.nix; goDeps = ./deps.nix;
buildInputs = [ parallel ]; buildInputs = [ pkgs.parallel ];
# Enable checks and configure check-phase to include vet: # Enable checks and configure check-phase to include vet:
doCheck = true; doCheck = true;

View file

@ -6,13 +6,12 @@
# #
# TODO(tazjin): Find a more elegant solution for the whole module # TODO(tazjin): Find a more elegant solution for the whole module
# situation. # situation.
{ lib, pkgs, depot, ... }@args: { depot, lib, pkgs, ... }@args:
let let
inherit (lib) findFirst isAttrs; inherit (lib) findFirst isAttrs;
in nixos = import "${depot.third_party.nixpkgsSrc}/nixos";
in rec {
rec {
whitby = import ./whitby/default.nix args; whitby = import ./whitby/default.nix args;
# System installation # System installation
@ -26,7 +25,7 @@ rec {
}; };
}; };
nixosFor = configuration: (depot.third_party.nixos { nixosFor = configuration: (nixos {
configuration = { ... }: { configuration = { ... }: {
imports = [ imports = [
baseModule baseModule

View file

@ -1,5 +1,5 @@
# Configuration for the TVL buildkite agents. # Configuration for the TVL buildkite agents.
{ config, depot, lib, ... }: { config, depot, pkgs, lib, ... }:
let let
cfg = config.services.depot.buildkite; cfg = config.services.depot.buildkite;
@ -8,7 +8,7 @@ let
# All Buildkite hooks are actually besadii, but it's being invoked # All Buildkite hooks are actually besadii, but it's being invoked
# with different names. # with different names.
buildkiteHooks = depot.third_party.runCommandNoCC "buildkite-hooks" {} '' buildkiteHooks = pkgs.runCommandNoCC "buildkite-hooks" {} ''
mkdir -p $out/bin mkdir -p $out/bin
ln -s ${depot.ops.besadii}/bin/besadii $out/bin/post-command ln -s ${depot.ops.besadii}/bin/besadii $out/bin/post-command
''; '';