style: format entire depot with nixpkgs-fmt

This CL can be used to compare the style of nixpkgs-fmt against other
formatters (nixpkgs, alejandra).

Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: wpcarro <wpcarro@gmail.com>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: kanepyork <rikingcoding@gmail.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: cynthia <cynthia@tvl.fyi>
Reviewed-by: edef <edef@edef.eu>
Reviewed-by: eta <tvl@eta.st>
Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
Vincent Ambo 2022-01-30 19:06:58 +03:00 committed by tazjin
parent 2d10d60fac
commit aa122cbae7
310 changed files with 7278 additions and 5490 deletions

View file

@ -8,7 +8,7 @@ in pkgs.abseil-cpp.override {
/* TODO(tazjin): update abseil subtree
fullLlvm11Stdenv.mkDerivation rec {
fullLlvm11Stdenv.mkDerivation rec {
pname = "abseil-cpp";
version = "20200519-768eb2ca+tvl-1";
src = ./.;
@ -17,15 +17,15 @@ fullLlvm11Stdenv.mkDerivation rec {
# doCheck = true;
cmakeFlags = [
"-DCMAKE_CXX_STANDARD=17"
#"-DABSL_RUN_TESTS=1"
"-DCMAKE_CXX_STANDARD=17"
#"-DABSL_RUN_TESTS=1"
];
meta = with lib; {
description = "An open-source collection of C++ code designed to augment the C++ standard library";
homepage = https://abseil.io/;
license = licenses.asl20;
maintainers = [ maintainers.andersk ];
description = "An open-source collection of C++ code designed to augment the C++ standard library";
homepage = https://abseil.io/;
license = licenses.asl20;
maintainers = [ maintainers.andersk ];
};
}
}
*/

View file

@ -9,7 +9,8 @@ let
agenix = import src {
inherit pkgs;
};
in {
in
{
inherit src;
cli = agenix.agenix;
}

View file

@ -1,8 +1,10 @@
{ pkgs, ... }:
(import (pkgs.fetchFromGitHub {
owner = "hercules-ci";
repo = "arion";
rev = "db6d4d7490dff363de60cebbece3ae9361e3ce43";
sha256 = "0d8nqmc7fjshigax2g47ips262v8ml27x0ksq59kmprgb7ckzi5l";
}) { inherit pkgs; }).arion
(import
(pkgs.fetchFromGitHub {
owner = "hercules-ci";
repo = "arion";
rev = "db6d4d7490dff363de60cebbece3ae9361e3ce43";
sha256 = "0d8nqmc7fjshigax2g47ips262v8ml27x0ksq59kmprgb7ckzi5l";
})
{ inherit pkgs; }).arion

View file

@ -8,7 +8,8 @@
let
inherit (pkgs) bat runCommandNoCC;
in runCommandNoCC "bat-syntaxes.bin" {} ''
in
runCommandNoCC "bat-syntaxes.bin" { } ''
export HOME=$PWD
mkdir -p .config/bat/syntaxes
cp ${./Prolog.sublime-syntax} .config/bat/syntaxes

View file

@ -2,7 +2,8 @@
let
inherit (pkgs) stdenv gzip bzip2 xz luajit zlib autoconf openssl pkgconfig;
in stdenv.mkDerivation rec {
in
stdenv.mkDerivation rec {
pname = "cgit";
version = "master";
src = ./.;

View file

@ -5,4 +5,5 @@ pkgs.callPackage "${(pkgs.fetchFromGitHub {
repo = "clj2nix";
rev = "3d0a38c954c8e0926f57de1d80d357df05fc2f94";
sha256 = "0y77b988qdgsrp4w72v1f5rrh33awbps2qdgp2wr2nmmi44541w5";
})}/clj2nix.nix" {}
})}/clj2nix.nix"
{ }

View file

@ -24,32 +24,33 @@
# be able to pass `specialArgs`. We depend on this because `depot`
# needs to be partially evaluated in NixOS configuration before
# module imports are resolved.
nixos = {
configuration,
specialArgs ? {},
system ? builtins.currentSystem,
...
}:
let
eval = import "${pkgs.path}/nixos/lib/eval-config.nix" {
inherit specialArgs system;
modules = [
configuration
(import "${depot.path + "/ops/modules/default-imports.nix"}")
];
};
nixos =
{ configuration
, specialArgs ? { }
, system ? builtins.currentSystem
, ...
}:
let
eval = import "${pkgs.path}/nixos/lib/eval-config.nix" {
inherit specialArgs system;
modules = [
configuration
(import "${depot.path + "/ops/modules/default-imports.nix"}")
];
};
# This is for `nixos-rebuild build-vm'.
vmConfig = (import "${pkgs.path}/nixos/lib/eval-config.nix" {
inherit specialArgs system;
modules = [
configuration
"${pkgs.path}/nixos/modules/virtualisation/qemu-vm.nix"
];
}).config;
in {
inherit (eval) pkgs config options;
system = eval.config.system.build.toplevel;
vm = vmConfig.system.build.vm;
};
# This is for `nixos-rebuild build-vm'.
vmConfig = (import "${pkgs.path}/nixos/lib/eval-config.nix" {
inherit specialArgs system;
modules = [
configuration
"${pkgs.path}/nixos/modules/virtualisation/qemu-vm.nix"
];
}).config;
in
{
inherit (eval) pkgs config options;
system = eval.config.system.build.toplevel;
vm = vmConfig.system.build.vm;
};
}

View file

@ -5,11 +5,14 @@ let
# broken most of the time. The binaries are also fully static
# builds, instead of the half-static crap that nixpkgs produces.
easy-dhall-nix =
import (builtins.fetchTarball {
url = "https://github.com/justinwoo/easy-dhall-nix/archive/eae7f64c4d6c70681e5a56c84198236930ba425e.tar.gz";
sha256 = "1y2x15v8a679vlpxazjpibfwajp6zph60f8wjcm4xflbvazk0dx7";
}) { inherit pkgs; };
in {
import
(builtins.fetchTarball {
url = "https://github.com/justinwoo/easy-dhall-nix/archive/eae7f64c4d6c70681e5a56c84198236930ba425e.tar.gz";
sha256 = "1y2x15v8a679vlpxazjpibfwajp6zph60f8wjcm4xflbvazk0dx7";
})
{ inherit pkgs; };
in
{
dhall = easy-dhall-nix.dhall-simple;
dhall-bash = easy-dhall-nix.dhall-bash-simple;
dhall-docs = easy-dhall-nix.dhall-docs-simple;

View file

@ -7,9 +7,11 @@
{ pkgs, ... }:
(import (pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "14f9ee66e63077539252f8b4550049381a082518";
sha256 = "1wn7nmb1cqfk2j91l3rwc6yhimfkzxprb8wknw5wi57yhq9m6lv1";
}) {}).elmPackages
(import
(pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "14f9ee66e63077539252f8b4550049381a082518";
sha256 = "1wn7nmb1cqfk2j91l3rwc6yhimfkzxprb8wknw5wi57yhq9m6lv1";
})
{ }).elmPackages

View file

@ -1,33 +1,35 @@
{ depot, pkgs, ... }:
{
buildGerritBazelPlugin = {
name,
src,
depsOutputHash,
overlayPluginCmd ? ''
cp -R "${src}" "$out/plugins/${name}"
'',
postPatch ? "",
}: ((depot.third_party.gerrit.override {
name = "${name}.jar";
buildGerritBazelPlugin =
{ name
, src
, depsOutputHash
, overlayPluginCmd ? ''
cp -R "${src}" "$out/plugins/${name}"
''
, postPatch ? ""
,
}: ((depot.third_party.gerrit.override {
name = "${name}.jar";
src = pkgs.runCommandLocal "${name}-src" {} ''
cp -R "${depot.third_party.gerrit.src}" "$out"
chmod +w "$out/plugins"
${overlayPluginCmd}
'';
src = pkgs.runCommandLocal "${name}-src" { } ''
cp -R "${depot.third_party.gerrit.src}" "$out"
chmod +w "$out/plugins"
${overlayPluginCmd}
'';
bazelTarget = "//plugins/${name}";
}).overrideAttrs (super: {
deps = super.deps.overrideAttrs (superDeps: {
outputHash = depsOutputHash;
});
installPhase = ''
cp "bazel-bin/plugins/${name}/${name}.jar" "$out"
'';
postPatch = if super ? postPatch then ''
${super.postPatch}
${postPatch}
'' else postPatch;
}));
bazelTarget = "//plugins/${name}";
}).overrideAttrs (super: {
deps = super.deps.overrideAttrs (superDeps: {
outputHash = depsOutputHash;
});
installPhase = ''
cp "bazel-bin/plugins/${name}/${name}.jar" "$out"
'';
postPatch =
if super ? postPatch then ''
${super.postPatch}
${postPatch}
'' else postPatch;
}));
}

View file

@ -2,7 +2,8 @@
let
inherit (import ./builder.nix args) buildGerritBazelPlugin;
in depot.nix.readTree.drvTargets {
in
depot.nix.readTree.drvTargets {
# https://gerrit.googlesource.com/plugins/owners
owners = buildGerritBazelPlugin rec {
name = "owners";

View file

@ -2,7 +2,8 @@
let
inherit (import ../builder.nix args) buildGerritBazelPlugin;
in buildGerritBazelPlugin rec {
in
buildGerritBazelPlugin rec {
name = "oauth";
depsOutputHash = "sha256:0j86amkw54y177s522hc988hqg034fsrkywbsb9a7h14zwcqbran";
src = pkgs.fetchgit {

View file

@ -2,8 +2,8 @@
# `pkgs.srcOnly`.
{ pkgs, ... }:
pkgs.git.overrideAttrs(old: {
patches = (old.patches or []) ++ [
pkgs.git.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
./0001-feat-third_party-git-date-add-dottime-format.patch
];
})

View file

@ -1,14 +1,17 @@
{ pkgs, ... }:
let
gitignoreNix = import (pkgs.fetchFromGitHub {
owner = "hercules-ci";
repo = "gitignore";
rev = "f9e996052b5af4032fe6150bba4a6fe4f7b9d698";
sha256 = "0jrh5ghisaqdd0vldbywags20m2cxpkbbk5jjjmwaw0gr8nhsafv";
}) { inherit (pkgs) lib; };
gitignoreNix = import
(pkgs.fetchFromGitHub {
owner = "hercules-ci";
repo = "gitignore";
rev = "f9e996052b5af4032fe6150bba4a6fe4f7b9d698";
sha256 = "0jrh5ghisaqdd0vldbywags20m2cxpkbbk5jjjmwaw0gr8nhsafv";
})
{ inherit (pkgs) lib; };
in {
in
{
__functor = _: gitignoreNix.gitignoreSource;
# expose extra functions here

View file

@ -3,15 +3,17 @@
depot.nix.buildGo.external {
path = "github.com/charmbracelet/bubbletea";
src =
let gitSrc = pkgs.fetchFromGitHub {
let
gitSrc = pkgs.fetchFromGitHub {
owner = "charmbracelet";
repo = "bubbletea";
rev = "v0.13.1";
sha256 = "0yf2fjkvx8ym9n6f3qp2z7sxs0qsfpj148sfvbrp38k67s3h20cs";
};
# The examples/ directory is fairly extensive,
# but it also adds most of the dependencies.
in pkgs.runCommand gitSrc.name {} ''
# The examples/ directory is fairly extensive,
# but it also adds most of the dependencies.
in
pkgs.runCommand gitSrc.name { } ''
mkdir -p $out
ln -s "${gitSrc}"/* $out
rm -r $out/examples

View file

@ -5,7 +5,7 @@
stdenv = pkgs.fullLlvm11Stdenv;
abseil-cpp = depot.third_party.abseil_cpp;
re2 = depot.third_party.re2;
}).overrideAttrs(orig: rec {
}).overrideAttrs (orig: rec {
cmakeFlags = orig.cmakeFlags ++ [
"-DCMAKE_CXX_STANDARD_REQUIRED=ON"
"-DCMAKE_CXX_STANDARD=17"

View file

@ -2,7 +2,7 @@
(pkgs.gtest.override {
stdenv = pkgs.fullLlvm11Stdenv;
}).overrideAttrs(_: {
}).overrideAttrs (_: {
src = pkgs.fetchFromGitHub {
owner = "google";
repo = "googletest";

View file

@ -8,7 +8,8 @@ let
rev = "69dc986e506ba5631c8bbf52835da076a18ec8dc";
hash = "sha256:0ybc6ivjkm7bchaszs9lhbl1gbjnyhwq7a3vw6jml3ama84l52lb";
};
in depot.third_party.naersk.buildPackage {
in
depot.third_party.naersk.buildPackage {
inherit src;
buildInputs = with pkgs; [
@ -18,8 +19,11 @@ in depot.third_party.naersk.buildPackage {
];
cargoBuildOptions = x: x ++ [
"-p" "josh"
"-p" "josh-proxy"
"-p" "josh-ui"
"-p"
"josh"
"-p"
"josh-proxy"
"-p"
"josh-ui"
];
}

View file

@ -5,7 +5,8 @@
let
src = with pkgs; srcOnly lispPackages.bordeaux-threads;
getSrc = f: "${src}/src/${f}";
in depot.nix.buildLisp.library {
in
depot.nix.buildLisp.library {
name = "bordeaux-threads";
deps = [ depot.third_party.lisp.alexandria ];

View file

@ -1,5 +1,5 @@
# Portable pathname library
{ depot, pkgs, ...}:
{ depot, pkgs, ... }:
with depot.nix;
@ -18,7 +18,7 @@ in buildLisp.library {
srcs = map (f: src + ("/" + f)) [
"packages.lisp"
] ++ [
{ ccl = "${src}/openmcl.lisp"; }
{ ccl = "${src}/openmcl.lisp"; }
] ++ map (f: src + ("/" + f)) [
"fad.lisp"
"path.lisp"

View file

@ -10,19 +10,20 @@ let
rev = "6dfebb9540bfc3cc33582d0c03c9ec27cb913e79";
sha256 = "0fx3m3x3s5ji950yzpazz4s0img3l6b3d6l3jrfjv0lr702496lh";
};
in buildLisp.library {
in
buildLisp.library {
name = "cl-json";
deps = [ (buildLisp.bundled "asdf") ];
srcs = [ "${src}/cl-json.asd" ] ++
(map (f: src + ("/src/" + f)) [
"package.lisp"
"common.lisp"
"objects.lisp"
"camel-case.lisp"
"decoder.lisp"
"encoder.lisp"
"utils.lisp"
"json-rpc.lisp"
]);
(map (f: src + ("/src/" + f)) [
"package.lisp"
"common.lisp"
"objects.lisp"
"camel-case.lisp"
"decoder.lisp"
"encoder.lisp"
"utils.lisp"
"json-rpc.lisp"
]);
}

View file

@ -3,12 +3,14 @@
with depot.nix;
let src = pkgs.fetchgit {
url = "https://github.com/cl-plus-ssl/cl-plus-ssl.git";
rev = "29081992f6d7b4e3aa2c5eeece4cd92b745071f4";
hash = "sha256:16lyrixl98b7vy29dbbzkbq0xaz789350dajrr1gdny5i55rkjq0";
};
in buildLisp.library {
let
src = pkgs.fetchgit {
url = "https://github.com/cl-plus-ssl/cl-plus-ssl.git";
rev = "29081992f6d7b4e3aa2c5eeece4cd92b745071f4";
hash = "sha256:16lyrixl98b7vy29dbbzkbq0xaz789350dajrr1gdny5i55rkjq0";
};
in
buildLisp.library {
name = "cl-plus-ssl";
deps = with depot.third_party.lisp; [
alexandria

View file

@ -40,7 +40,7 @@ let
"char-info.lisp"
"read.lisp"
]) ++ [
(runCommand "dump.lisp" {} ''
(runCommand "dump.lisp" { } ''
substitute ${src}/build/dump.lisp $out \
--replace ':defaults *this-file*' ":defaults (uiop:getcwd)"
'')
@ -55,7 +55,7 @@ let
};
generated = runCommand "cl-unicode-generated" {} ''
generated = runCommand "cl-unicode-generated" { } ''
mkdir -p $out/build
mkdir -p $out/test
cd $out/build
@ -66,7 +66,7 @@ let
in
depot.nix.buildLisp.library {
name = "cl-unicode";
deps = [cl-unicode-base];
deps = [ cl-unicode-base ];
srcs = [
"${src}/conditions.lisp"
"${generated}/lists.lisp"

View file

@ -1,12 +1,14 @@
{ depot, pkgs, ... }:
let src = pkgs.fetchFromGitHub {
let
src = pkgs.fetchFromGitHub {
owner = "jech";
repo = "cl-yacc";
rev = "1334f5469251ffb3f8738a682dc8ee646cb26635";
sha256 = "16946pzf8vvadnyfayvj8rbh4zjzw90h0azz2qk1mxrvhh5wklib";
};
in depot.nix.buildLisp.library {
in
depot.nix.buildLisp.library {
name = "cl-yacc";
srcs = map (f: src + ("/" + f)) [

View file

@ -3,7 +3,8 @@
let
src = with pkgs; srcOnly lispPackages.closure-common;
getSrcs = builtins.map (p: "${src}/${p}");
in depot.nix.buildLisp.library {
in
depot.nix.buildLisp.library {
name = "closure-common";
# closure-common.asd surpresses some warnings otherwise breaking
@ -18,12 +19,12 @@ in depot.nix.buildLisp.library {
"closure-common.asd"
"package.lisp"
"definline.lisp"
"characters.lisp" #+rune-is-character
"characters.lisp" #+rune-is-character
"syntax.lisp"
"encodings.lisp" #-x&y-streams-are-stream
"encodings.lisp" #-x&y-streams-are-stream
"encodings-data.lisp" #-x&y-streams-are-stream
"xstream.lisp" #-x&y-streams-are-stream
"ystream.lisp" #-x&y-streams-are-stream
"xstream.lisp" #-x&y-streams-are-stream
"ystream.lisp" #-x&y-streams-are-stream
"hax.lisp"
];

View file

@ -9,7 +9,8 @@ let
sha256 = "06lnipwc6mmg0v5gybcnr7wn5xmn5xfd1gs19vbima777245bfka";
};
in depot.nix.buildLisp.library {
in
depot.nix.buildLisp.library {
name = "easy-routes";
deps = with depot.third_party.lisp; [
hunchentoot

View file

@ -28,6 +28,6 @@ in depot.nix.buildLisp.library {
"input.lisp"
"io.lisp"
"strings.lisp"
];
];
}

View file

@ -3,5 +3,5 @@
let src = with pkgs; srcOnly lispPackages.global-vars;
in depot.nix.buildLisp.library {
name = "global-vars";
srcs = [ "${src}/global-vars.lisp" ] ;
srcs = [ "${src}/global-vars.lisp" ];
}

View file

@ -1,5 +1,5 @@
# Hunchentoot is a web framework for Common Lisp.
{ depot, pkgs, ...}:
{ depot, pkgs, ... }:
let
src = with pkgs; srcOnly lispPackages.hunchentoot;
@ -15,7 +15,8 @@ let
"url-rewrite.lisp"
];
};
in depot.nix.buildLisp.library {
in
depot.nix.buildLisp.library {
name = "hunchentoot";
deps = with depot.third_party.lisp; [

View file

@ -1,4 +1,4 @@
{ depot, pkgs, ...}:
{ depot, pkgs, ... }:
let
inherit (pkgs) runCommand;
@ -6,7 +6,8 @@ let
src = with pkgs; srcOnly lispPackages.ironclad;
getSrc = f: "${src}/src/${f}";
in depot.nix.buildLisp.library {
in
depot.nix.buildLisp.library {
name = "ironclad";
deps = with depot.third_party.lisp; [

View file

@ -8,7 +8,8 @@ let
sha256 = "11mxzyx34ynsfsrs8pgrarqi9s442vkpmh7kdpzvarhj7i97g8yx";
};
in depot.nix.buildLisp.library {
in
depot.nix.buildLisp.library {
name = "lass";
deps = with depot.third_party.lisp; [

View file

@ -1,13 +1,15 @@
# A library to easily read and write complex binary formats.
{ depot, pkgs, ... }:
let src = pkgs.fetchFromGitHub {
owner = "j3pic";
repo = "lisp-binary";
rev = "052df578900dea59bf951e0a6749281fa73432e4";
sha256 = "1i1s5g01aimfq6lndcl1pnw7ly5hdh0wmjp2dj9cjjwbkz9lnwcf";
};
in depot.nix.buildLisp.library {
let
src = pkgs.fetchFromGitHub {
owner = "j3pic";
repo = "lisp-binary";
rev = "052df578900dea59bf951e0a6749281fa73432e4";
sha256 = "1i1s5g01aimfq6lndcl1pnw7ly5hdh0wmjp2dj9cjjwbkz9lnwcf";
};
in
depot.nix.buildLisp.library {
name = "lisp-binary";
deps = with depot.third_party.lisp; [

View file

@ -4,7 +4,8 @@
let
inherit (depot.nix) buildLisp;
src = with pkgs; srcOnly lispPackages.local-time;
in buildLisp.library {
in
buildLisp.library {
name = "local-time";
deps = [
depot.third_party.lisp.cl-fad

View file

@ -3,7 +3,8 @@
let
inherit (depot.nix.buildLisp) bundled;
src = with pkgs; srcOnly lispPackages.nibbles;
in depot.nix.buildLisp.library {
in
depot.nix.buildLisp.library {
name = "nibbles";
deps = with depot.third_party.lisp; [

View file

@ -88,6 +88,7 @@ let
];
};
in postmodern // {
in
postmodern // {
inherit s-sql cl-postgres;
}

View file

@ -20,7 +20,8 @@ let
];
};
in depot.nix.buildLisp.library {
in
depot.nix.buildLisp.library {
name = "routes";
deps = with depot.third_party.lisp; [

View file

@ -1,15 +1,17 @@
# XML serialiser for Common Lisp.
{ depot, pkgs, ... }:
let src = pkgs.applyPatches {
name = "s-xml-source";
src = pkgs.lispPackages.s-xml.src;
let
src = pkgs.applyPatches {
name = "s-xml-source";
src = pkgs.lispPackages.s-xml.src;
patches = [
./0001-fix-definition-order-in-xml.lisp.patch
];
};
in depot.nix.buildLisp.library {
patches = [
./0001-fix-definition-order-in-xml.lisp.patch
];
};
in
depot.nix.buildLisp.library {
name = "s-xml";
srcs = map (f: src + ("/src/" + f)) [

View file

@ -1,12 +1,14 @@
{ depot, pkgs, ... }:
let src = pkgs.fetchFromGitHub {
let
src = pkgs.fetchFromGitHub {
owner = "rwiker";
repo = "trivial-ldap";
rev = "3b8f1ff85f29ea63e6ab2d0d27029d68b046faf8";
sha256 = "1zaa4wnk5y5ff211pkg6dl27j4pjwh56hq0246slxsdxv6kvp1z9";
};
in depot.nix.buildLisp.library {
in
depot.nix.buildLisp.library {
name = "trivial-ldap";
deps = with depot.third_party.lisp; [

View file

@ -3,7 +3,7 @@
let
src = with pkgs; srcOnly lispPackages.trivial-mimes;
mime-types = pkgs.runCommand "mime-types.lisp" {} ''
mime-types = pkgs.runCommand "mime-types.lisp" { } ''
substitute ${src}/mime-types.lisp $out \
--replace /etc/mime.types ${src}/mime.types \
--replace "(asdf:system-source-directory :trivial-mimes)" '"/bogus-dir"'
@ -11,7 +11,8 @@ let
# generally fail — we are not using ASDF after all.
'';
in depot.nix.buildLisp.library {
in
depot.nix.buildLisp.library {
name = "trivial-mimes";
deps = [

View file

@ -4,7 +4,8 @@ let
inherit (pkgs) runCommand;
inherit (depot.nix.buildLisp) bundled;
src = with pkgs; srcOnly lispPackages.uax-15;
in depot.nix.buildLisp.library {
in
depot.nix.buildLisp.library {
name = "uax-15";
deps = with depot.third_party.lisp; [
@ -23,7 +24,7 @@ in depot.nix.buildLisp.library {
#
# additionally there are some wonky variable usages of variables
# that are never defined, for which we patch in defvar statements.
(runCommand "precomputed-tables.lisp" {} ''
(runCommand "precomputed-tables.lisp" { } ''
substitute ${src}/src/precomputed-tables.lisp precomputed-tables.lisp \
--replace "(asdf:system-source-directory (asdf:find-system 'uax-15 nil))" \
'"${src}/"'

View file

@ -1,5 +1,5 @@
# unix-opts is a portable command line argument parser
{ depot, pkgs, ...}:
{ depot, pkgs, ... }:
let src = with pkgs; srcOnly lispPackages.unix-opts;

View file

@ -4,7 +4,8 @@
let
inherit (depot.nix) buildLisp;
src = with pkgs; srcOnly lispPackages.usocket-server;
in buildLisp.library {
in
buildLisp.library {
name = "usocket-server";
deps = with depot.third_party.lisp; [

View file

@ -4,7 +4,8 @@
let
inherit (depot.nix) buildLisp;
src = with pkgs; srcOnly lispPackages.usocket;
in buildLisp.library {
in
buildLisp.library {
name = "usocket";
deps = with depot.third_party.lisp; [
(buildLisp.bundled "asdf")

View file

@ -1,8 +1,10 @@
{ pkgs, ... }:
pkgs.callPackage (pkgs.fetchFromGitHub {
owner = "nmattia";
repo = "naersk";
rev = "a3f40fe42cc6d267ff7518fa3199e99ff1444ac4";
sha256 = "1nf7fn8anghwf6p5p58ywbcwdkjxq112qv663rn52jq9k95iakdi";
}) {}
pkgs.callPackage
(pkgs.fetchFromGitHub {
owner = "nmattia";
repo = "naersk";
rev = "a3f40fe42cc6d267ff7518fa3199e99ff1444ac4";
sha256 = "1nf7fn8anghwf6p5p58ywbcwdkjxq112qv663rn52jq9k95iakdi";
})
{ }

View file

@ -9,11 +9,13 @@ derivation {
# !!! grmbl, need structured data for passing this in a clean way.
derivations =
map (d:
[ (d.meta.active or "true")
(d.meta.priority or 5)
(builtins.length d.outputs)
] ++ map (output: builtins.getAttr output d) d.outputs)
map
(d:
[
(d.meta.active or "true")
(d.meta.priority or 5)
(builtins.length d.outputs)
] ++ map (output: builtins.getAttr output d) d.outputs)
derivations;
# Building user environments remotely just causes huge amounts of

View file

@ -8,12 +8,14 @@ let
strict = derivationStrict drvAttrs;
commonAttrs = drvAttrs // (builtins.listToAttrs outputsList) //
{ all = map (x: x.value) outputsList;
{
all = map (x: x.value) outputsList;
inherit drvAttrs;
};
outputToAttrListElement = outputName:
{ name = outputName;
{
name = outputName;
value = commonAttrs // {
outPath = builtins.getAttr outputName strict;
drvPath = strict.drvPath;
@ -24,4 +26,5 @@ let
outputsList = map outputToAttrListElement outputs;
in (builtins.head outputsList).value
in
(builtins.head outputsList).value

View file

@ -2,12 +2,13 @@
, url
, hash ? "" # an SRI ash
# Legacy hash specification
, md5 ? "", sha1 ? "", sha256 ? "", sha512 ? ""
, outputHash ?
if hash != "" then hash else if sha512 != "" then sha512 else if sha1 != "" then sha1 else if md5 != "" then md5 else sha256
, outputHashAlgo ?
if hash != "" then "" else if sha512 != "" then "sha512" else if sha1 != "" then "sha1" else if md5 != "" then "md5" else "sha256"
# Legacy hash specification
, md5 ? ""
, sha1 ? ""
, sha256 ? ""
, sha512 ? ""
, outputHash ? if hash != "" then hash else if sha512 != "" then sha512 else if sha1 != "" then sha1 else if md5 != "" then md5 else sha256
, outputHashAlgo ? if hash != "" then "" else if sha512 != "" then "sha512" else if sha1 != "" then "sha1" else if md5 != "" then "md5" else "sha256"
, executable ? false
, unpack ? false
@ -33,7 +34,11 @@ derivation {
# easy proxy configuration. This is impure, but a fixed-output
# derivation like fetchurl is allowed to do so since its result is
# by definition pure.
"http_proxy" "https_proxy" "ftp_proxy" "all_proxy" "no_proxy"
"http_proxy"
"https_proxy"
"ftp_proxy"
"all_proxy"
"no_proxy"
];
# To make "nix-prefetch-url" work.

View file

@ -3,19 +3,22 @@ attrs @ { drvPath, outputs, name, ... }:
let
commonAttrs = (builtins.listToAttrs outputsList) //
{ all = map (x: x.value) outputsList;
{
all = map (x: x.value) outputsList;
inherit drvPath name;
type = "derivation";
};
outputToAttrListElement = outputName:
{ name = outputName;
{
name = outputName;
value = commonAttrs // {
outPath = builtins.getAttr outputName attrs;
inherit outputName;
};
};
outputsList = map outputToAttrListElement outputs;
in (builtins.head outputsList).value
in
(builtins.head outputsList).value

View file

@ -1,5 +1,4 @@
args@{
depot ? (import ../.. {})
args@{ depot ? (import ../.. { })
, pkgs ? depot.third_party.nixpkgs
, lib
, buildType ? "release"
@ -8,39 +7,43 @@ args@{
let
aws-s3-cpp = pkgs.aws-sdk-cpp.override {
apis = ["s3" "transfer"];
apis = [ "s3" "transfer" ];
customMemoryManagement = false;
};
src = let
srcDir = ./.;
# create relative paths for all the sources we are filtering
asRelative = path:
let
srcS = toString srcDir;
pathS = toString path;
in
src =
let
srcDir = ./.;
# create relative paths for all the sources we are filtering
asRelative = path:
let
srcS = toString srcDir;
pathS = toString path;
in
if ! lib.hasPrefix srcS pathS then
throw "Path is outside of the working directory."
else
lib.removePrefix srcS pathS;
lib.removePrefix srcS pathS;
in builtins.filterSource (path: type:
# Strip out .nix files that are in the root of the repository. Changing
# the expression of tvix shouldn't cause a rebuild of tvix unless really
# required.
!(dirOf (asRelative path) == "/" && lib.hasSuffix ".nix" path) &&
in
builtins.filterSource
(path: type:
# Strip out .nix files that are in the root of the repository. Changing
# the expression of tvix shouldn't cause a rebuild of tvix unless really
# required.
!(dirOf (asRelative path) == "/" && lib.hasSuffix ".nix" path) &&
# remove the proto files from the repo as those are compiled separately
!(lib.hasPrefix "src/proto" (asRelative path)) &&
# remove the proto files from the repo as those are compiled separately
!(lib.hasPrefix "src/proto" (asRelative path)) &&
# ignore result symlinks
!(type == "symlink" && lib.hasPrefix "result" (baseNameOf path))
) srcDir;
# ignore result symlinks
!(type == "symlink" && lib.hasPrefix "result" (baseNameOf path))
)
srcDir;
# Proto generation in CMake is theoretically possible, but that is
# very theoretical - this does it in Nix instead.
protoSrcs = pkgs.runCommand "nix-proto-srcs" {} ''
protoSrcs = pkgs.runCommand "nix-proto-srcs" { } ''
export PROTO_SRCS=${./src/proto}
mkdir -p $out/libproto
${depot.third_party.protobuf}/bin/protoc -I=$PROTO_SRCS \
@ -52,12 +55,13 @@ let
# Derivation for busybox that just has the `busybox` binary in bin/, not all
# the symlinks, so cmake can find it
busybox = pkgs.runCommand "busybox" {} ''
busybox = pkgs.runCommand "busybox" { } ''
mkdir -p $out/bin
cp ${pkgs.busybox}/bin/busybox $out/bin
'';
in lib.fix (self: pkgs.fullLlvm11Stdenv.mkDerivation {
in
lib.fix (self: pkgs.fullLlvm11Stdenv.mkDerivation {
pname = "tvix";
version = "2.3.4";
inherit src;
@ -141,7 +145,7 @@ in lib.fix (self: pkgs.fullLlvm11Stdenv.mkDerivation {
# Work around broken system header include flags in the cxx toolchain.
LIBCXX_INCLUDE = "${pkgs.llvmPackages_11.libcxx}/include/c++/v1";
SANDBOX_SHELL="${pkgs.busybox}/bin/busybox";
SANDBOX_SHELL = "${pkgs.busybox}/bin/busybox";
# Install the various symlinks to the Nix binary which users expect
# to exist.
@ -190,7 +194,7 @@ in lib.fix (self: pkgs.fullLlvm11Stdenv.mkDerivation {
${pkgs.jq}/bin/jq < compile_commands.json -r 'map(.file)|.[]' | grep -v '/generated/' | ${pkgs.parallel}/bin/parallel ${pkgs.clang-tools}/bin/clang-tidy -p compile_commands.json $@
'';
installCheckInputs = up.installCheckInputs ++ [run_clang_tidy];
installCheckInputs = up.installCheckInputs ++ [ run_clang_tidy ];
shellHook = ''
export NIX_DATA_DIR="${toString depot.path}/third_party"

View file

@ -16,4 +16,5 @@ let
};
system = depot.third_party.nixos { inherit configuration; };
in system.vm
in
system.vm

View file

@ -12,7 +12,8 @@ let
rev = commit;
sha256 = "195rz25y3hfxcmniysajzjg7g69qhz7w06lql8fn0dbcdcxsq6g4";
};
in drvTargets (import src {
in
drvTargets (import src {
inherit pkgs;
commitHash = _: commit;
})

View file

@ -6,7 +6,7 @@
# in //default.nix passes this attribute as the `pkgs` argument to all
# readTree derivations.
{ depot ? {}, externalArgs ? {}, depotOverlays ? true, ... }:
{ depot ? { }, externalArgs ? { }, depotOverlays ? true, ... }:
let
# This provides the sources of nixpkgs. We track both
@ -42,7 +42,7 @@ let
# Stable package set is imported, but not exposed, to overlay
# required packages into the unstable set.
stableNixpkgs = import stableNixpkgsSrc {};
stableNixpkgs = import stableNixpkgsSrc { };
# Overlay for packages that should come from the stable channel
# instead (e.g. because something is broken in unstable).
@ -58,7 +58,8 @@ let
};
};
in import nixpkgsSrc {
in
import nixpkgsSrc {
# allow users to inject their config into builds (e.g. to test CA derivations)
config =
(if externalArgs ? nixpkgsConfig then externalArgs.nixpkgsConfig else { })
@ -75,5 +76,5 @@ in import nixpkgsSrc {
depot.third_party.overlays.emacs
depot.third_party.overlays.tvl
depot.third_party.overlays.ecl-static
] else []);
] else [ ]);
}

View file

@ -8,4 +8,5 @@ let
url = "https://github.com/nix-community/emacs-overlay/archive/${commit}.tar.gz";
sha256 = "1b7rmshf1wc9wcml7jlzggdzilj644brk5m49fry6lv53vqmykjq";
};
in import src
in
import src

View file

@ -11,7 +11,8 @@ let
generic-arbitrary = appendPatch hsSuper.generic-arbitrary
[ ./patches/generic-arbitrary-export-garbitrary.patch ];
};
in {
in
{
haskellPackages = super.haskellPackages.override {
inherit overrides;
};

View file

@ -28,14 +28,14 @@ self: super: {
notmuch = super.notmuch.emacs;
# Build EXWM with the depot sources instead.
exwm = esuper.exwm.overrideAttrs(_: {
exwm = esuper.exwm.overrideAttrs (_: {
src = depot.path.origSrc + "/third_party/exwm";
});
})
);
# dottime support for notmuch
notmuch = super.notmuch.overrideAttrs(old: {
notmuch = super.notmuch.overrideAttrs (old: {
passthru = old.passthru // {
patches = old.patches ++ [ ./patches/notmuch-dottime.patch ];
};
@ -46,13 +46,13 @@ self: super: {
nix-serve = super.nix-serve.override { nix = super.nix_2_3; };
# Avoid builds of mkShell derivations in CI.
mkShell = super.lib.makeOverridable(args: (super.mkShell args) // {
mkShell = super.lib.makeOverridable (args: (super.mkShell args) // {
meta.ci.skip = true;
});
# bump nixpkgs-fmt to a version that doesn't touch whitespace in
# strings
nixpkgs-fmt = super.nixpkgs-fmt.overrideAttrs(old: rec {
nixpkgs-fmt = super.nixpkgs-fmt.overrideAttrs (old: rec {
src = self.fetchFromGitHub {
owner = "nix-community";
repo = "nixpkgs-fmt";
@ -60,7 +60,7 @@ self: super: {
sha256 = "0hjkbcgz62793hzfzlaxyah8a2c1k79n1k891lg7kfw8mkbq0w4p";
};
cargoDeps = old.cargoDeps.overrideAttrs(_: {
cargoDeps = old.cargoDeps.overrideAttrs (_: {
inherit src;
outputHash = "10if2lmv8d95j3walq3ggx3y423yfy4yl9vplw3apd0s671bly8b";
});

View file

@ -10,7 +10,8 @@ let
p.prometheus_client
]);
in pkgs.writeShellScriptBin "prometheus-fail2ban-exporter" ''
in
pkgs.writeShellScriptBin "prometheus-fail2ban-exporter" ''
set -eo pipefail
exec "${python}/bin/python" "${script}"

View file

@ -7,7 +7,8 @@
let
inherit (pkgs) fetchFromGitHub;
inherit (pkgs.python3Packages) buildPythonPackage cryptography;
in buildPythonPackage (lib.fix (self: {
in
buildPythonPackage (lib.fix (self: {
pname = "python-broadlink";
version = "0.13.2";
src = ./.;

View file

@ -4,17 +4,17 @@
# Intended for manual updates, which keeps us honest with what we pull into our closure.
let
buildRustCrate = attrs@{
edition ? "2018",
pname,
crateName ? pname,
...
}: pkgs.buildRustCrate (attrs // {
inherit
crateName
edition
;
});
buildRustCrate =
attrs@{ edition ? "2018"
, pname
, crateName ? pname
, ...
}: pkgs.buildRustCrate (attrs // {
inherit
crateName
edition
;
});
in
rec {

View file

@ -20,5 +20,5 @@ pkgs.fetchFromGitHub {
inherit (pin)
rev
sha256
;
;
}