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; nix = nix;
extraContents = [ cachix ]; extraContents = [ cachix ];
}).overrideAttrs (prev: { }).overrideAttrs (prev: {
meta = (prev.meta or {}) // { meta = (prev.meta or { }) // {
description = "Nix and Cachix image"; description = "Nix and Cachix image";
}; };
}) })

View file

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

View file

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

View file

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

View file

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

View file

@ -1,17 +1,18 @@
_: pkgs: let _: pkgs:
let
importDir = import ./lib/importDir.nix { importDir = import ./lib/importDir.nix {
inherit (pkgs) lib; inherit (pkgs) lib;
}; };
in in
{ {
# builder stuff can be in the top-level # 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 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 # 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 # gitMinimal still ships with perl and python
gitReallyMinimal = ( gitReallyMinimal = (

View file

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

View file

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