2019-08-15 17:07:28 +02:00
|
|
|
# This file sets up the top-level package set by merging all local packages into
|
|
|
|
# the nixpkgs top-level.
|
|
|
|
#
|
|
|
|
# This makes packages accessible via the Nixery instance that is configured to
|
|
|
|
# use this repository as its nixpkgs source.
|
2019-06-29 15:12:24 +02:00
|
|
|
|
2019-08-19 03:28:03 +02:00
|
|
|
with builtins;
|
|
|
|
|
2019-06-29 15:12:24 +02:00
|
|
|
let
|
2019-08-25 18:54:17 +02:00
|
|
|
# The pinned commit here is identical to the public nixery.dev
|
|
|
|
# version, since popularity data has been generated for that.
|
2019-10-25 10:03:52 +02:00
|
|
|
stableCommit = "80b42e630b23052d9525840a9742100a2ceaaa8f";
|
2019-08-25 18:54:17 +02:00
|
|
|
stableSrc = fetchTarball {
|
|
|
|
url = "https://github.com/NixOS/nixpkgs-channels/archive/${stableCommit}.tar.gz";
|
2019-10-25 10:03:52 +02:00
|
|
|
sha256 = "0243qiivxl3z51biy4f5y5cy81x5bki5dazl9wqwgnmd373gpmxy";
|
2019-08-25 18:54:17 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
unstableCommit = "765a71f15025ce78024bae3dc4a92bd2be3a8fbf";
|
|
|
|
unstableSrc = fetchTarball {
|
|
|
|
url = "https://github.com/NixOS/nixpkgs-channels/archive/${unstableCommit}.tar.gz";
|
|
|
|
sha256 = "0j1wghr9dj9njn3x9xi0wzjk1107gi2pxb0w2dk8g0djmhnlx71q";
|
|
|
|
};
|
|
|
|
unstable = import unstableSrc {};
|
|
|
|
|
2019-09-02 02:24:23 +02:00
|
|
|
localPkgs = self: super: {
|
2019-07-04 16:55:13 +02:00
|
|
|
# Local projects should be added here:
|
2019-08-16 17:50:50 +02:00
|
|
|
tazjin = {
|
2019-09-02 17:53:54 +02:00
|
|
|
blog = self.callPackage ./services/tazblog {};
|
2019-09-02 02:24:23 +02:00
|
|
|
blog_cli = self.callPackage ./tools/blog_cli {};
|
|
|
|
gemma = self.callPackage ./services/gemma {};
|
2019-09-03 16:56:31 +02:00
|
|
|
|
|
|
|
kms_pass = self.callPackage ./tools/kms_pass {
|
|
|
|
project = "tazjins-infrastructure";
|
|
|
|
region = "europe-north1";
|
|
|
|
keyring = "tazjins-keys";
|
|
|
|
key = "kontemplate-key";
|
|
|
|
};
|
2019-08-16 17:50:50 +02:00
|
|
|
};
|
2019-07-02 15:38:16 +02:00
|
|
|
|
2019-08-15 17:07:28 +02:00
|
|
|
# Third-party projects (either vendored or modified from nixpkgs) go here:
|
2019-09-02 02:24:23 +02:00
|
|
|
nixery = import ./third_party/nixery.nix { pkgs = self; };
|
2019-10-25 10:03:52 +02:00
|
|
|
terraform-gcp = self.terraform_0_12.withPlugins(p: [ p.google p.google-beta ]);
|
2019-09-02 02:24:23 +02:00
|
|
|
ormolu = import (self.fetchFromGitHub {
|
2019-08-20 01:26:54 +02:00
|
|
|
owner = "tweag";
|
|
|
|
repo = "ormolu";
|
|
|
|
rev = "a7076c0f83e5c06ea9067b71171859fa2ba8afd9";
|
|
|
|
sha256 = "1p4n2ja4ciw3qfskn65ggpy37mvgf2sslxqmqn8s8jjarnqcyfny";
|
2019-09-02 02:24:23 +02:00
|
|
|
}) { pkgs = self; };
|
2019-08-23 16:28:23 +02:00
|
|
|
|
|
|
|
# Gemma needs an older version of Elm to be built. Updating it to
|
|
|
|
# the newer version is a lot of effort.
|
2019-09-02 02:24:23 +02:00
|
|
|
elmPackages = (import (self.fetchFromGitHub {
|
2019-08-23 16:28:23 +02:00
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nixpkgs";
|
|
|
|
rev = "14f9ee66e63077539252f8b4550049381a082518";
|
|
|
|
sha256 = "1wn7nmb1cqfk2j91l3rwc6yhimfkzxprb8wknw5wi57yhq9m6lv1";
|
|
|
|
}) {}).elmPackages;
|
2019-09-02 02:24:41 +02:00
|
|
|
|
2019-09-03 16:56:31 +02:00
|
|
|
# Wrap kontemplate to inject the Cloud KMS version of 'pass'
|
2019-09-04 13:58:04 +02:00
|
|
|
kontemplate =
|
|
|
|
let master = super.kontemplate.overrideAttrs(_: {
|
|
|
|
src = self.fetchFromGitHub {
|
|
|
|
owner = "tazjin";
|
|
|
|
repo = "kontemplate";
|
|
|
|
rev = "v1.8.0";
|
|
|
|
sha256 = "123mjmmm4hynraq1fpn3j5i0a1i87l265kkjraxxxbl0zacv74i1";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
in self.writeShellScriptBin "kontemplate" ''
|
|
|
|
export PATH="${self.tazjin.kms_pass}/bin:$PATH"
|
|
|
|
exec ${master}/bin/kontemplate $@
|
|
|
|
'';
|
2019-09-03 16:56:31 +02:00
|
|
|
|
2019-09-02 02:24:41 +02:00
|
|
|
# One of Gemma's dependencies is missing in nixpkgs' Quicklisp
|
|
|
|
# package set, it is overlaid locally here.
|
|
|
|
lispPackages = import ./third_party/common_lisp/quicklisp.nix {
|
|
|
|
inherit (self) lib;
|
|
|
|
inherit (super) lispPackages;
|
|
|
|
};
|
2019-09-22 18:19:13 +02:00
|
|
|
|
|
|
|
# All projects that should be built by CI should be added here:
|
|
|
|
ciProjects = [
|
|
|
|
self.kontemplate
|
|
|
|
self.nixery
|
|
|
|
self.ormolu
|
|
|
|
self.terraform-gcp
|
|
|
|
] ++ filter (d: d ? meta.broken && !d.meta.broken) (attrValues self.tazjin);
|
2019-06-29 15:12:24 +02:00
|
|
|
};
|
|
|
|
|
2019-08-25 18:54:17 +02:00
|
|
|
in { ... } @ args: import stableSrc (args // {
|
2019-06-29 15:12:24 +02:00
|
|
|
overlays = [ localPkgs ];
|
2019-08-15 17:07:28 +02:00
|
|
|
config.allowUnfree = true;
|
2019-07-04 12:15:59 +02:00
|
|
|
})
|