nixpkgs-fmt

This commit is contained in:
zimbatm 2021-03-08 12:17:56 +01:00
parent 70854a5310
commit e850799428
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
8 changed files with 16 additions and 15 deletions

View file

@ -6,7 +6,7 @@
nix = nix;
extraContents = [ cachix ];
}).overrideAttrs (prev: {
meta = (prev.meta or {}) // {
meta = (prev.meta or { }) // {
description = "Nix and Cachix image";
};
})

View file

@ -25,7 +25,7 @@
, mkUserEnvironment
}:
let
channel = builtins.getEnv("NIXPKGS_CHANNEL");
channel = builtins.getEnv ("NIXPKGS_CHANNEL");
# generate a user profile for the image
profile = mkUserEnvironment {

View file

@ -10,7 +10,7 @@
, nix
, openssh
, xz
, extraContents ? []
, extraContents ? [ ]
}:
let
image = dockerTools.buildImageWithNixDb {

View file

@ -1,10 +1,10 @@
_:
throw ''
This container doesn't include nixpkgs.
This container doesn't include nixpkgs.
The best way to work around that is to pin your dependencies. See
https://nix.dev/tutorials/towards-reproducibility-pinning-nixpkgs.html
The best way to work around that is to pin your dependencies. See
https://nix.dev/tutorials/towards-reproducibility-pinning-nixpkgs.html
Or if you must, override the NIX_PATH environment variable with eg:
"NIX_PATH=nixpkgs=channel:nixos-unstable"
Or if you must, override the NIX_PATH environment variable with eg:
"NIX_PATH=nixpkgs=channel:nixos-unstable"
''

View file

@ -5,7 +5,7 @@
{ drv # derivation to build the image for
# Name of the binary to run by default
, binName ? (builtins.parseDrvName drv.name).name
, extraContents ? []
, extraContents ? [ ]
, meta ? drv.meta
}:
let

View file

@ -1,17 +1,18 @@
_: pkgs: let
_: pkgs:
let
importDir = import ./lib/importDir.nix {
inherit (pkgs) lib;
};
in
{
# builder stuff can be in the top-level
buildCLIImage = pkgs.callPackage ./lib/buildCLIImage.nix {};
buildCLIImage = pkgs.callPackage ./lib/buildCLIImage.nix { };
# docker images must be lower-cased
docker-nixpkgs = importDir (path: pkgs.callPackage path {}) ./images;
docker-nixpkgs = importDir (path: pkgs.callPackage path { }) ./images;
# used to build nix-env compatible user environments
mkUserEnvironment = pkgs.callPackage ./lib/mkUserEnvironment.nix {};
mkUserEnvironment = pkgs.callPackage ./lib/mkUserEnvironment.nix { };
# gitMinimal still ships with perl and python
gitReallyMinimal = (

View file

@ -1,7 +1,7 @@
import <nixpkgs> {
# docker images run on Linux
system = "x86_64-linux";
config = {};
config = { };
overlays = [
(import ./overlay.nix)
];

View file

@ -1,6 +1,6 @@
let
nixpkgs = builtins.fetchTarball "channel:nixos-20.09";
pkgs = import nixpkgs { config = {}; overlays = []; };
pkgs = import nixpkgs { config = { }; overlays = [ ]; };
in
with pkgs;
mkShell {