nixos/modules: stdenv.lib -> lib
This commit is contained in:
parent
50cbe8b517
commit
66dc9dbb59
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, makeWrapper, perl, perlPackages }:
|
{ stdenv, lib, makeWrapper, perl, perlPackages }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "nixpkgs-lint-1";
|
name = "nixpkgs-lint-1";
|
||||||
|
@ -15,9 +15,9 @@ stdenv.mkDerivation {
|
||||||
wrapProgram $out/bin/nixpkgs-lint --set PERL5LIB $PERL5LIB
|
wrapProgram $out/bin/nixpkgs-lint --set PERL5LIB $PERL5LIB
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
maintainers = [ stdenv.lib.maintainers.eelco ];
|
maintainers = [ maintainers.eelco ];
|
||||||
description = "A utility for Nixpkgs contributors to check Nixpkgs for common errors";
|
description = "A utility for Nixpkgs contributors to check Nixpkgs for common errors";
|
||||||
platforms = stdenv.lib.platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
gnu = mkOption {
|
gnu = lib.mkOption {
|
||||||
type = types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
When enabled, GNU software is chosen by default whenever a there is
|
When enabled, GNU software is chosen by default whenever a there is
|
||||||
|
@ -15,7 +13,7 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.gnu {
|
config = lib.mkIf config.gnu {
|
||||||
|
|
||||||
environment.systemPackages = with pkgs;
|
environment.systemPackages = with pkgs;
|
||||||
# TODO: Adjust `requiredPackages' from `system-path.nix'.
|
# TODO: Adjust `requiredPackages' from `system-path.nix'.
|
||||||
|
@ -26,7 +24,7 @@ with lib;
|
||||||
nano zile
|
nano zile
|
||||||
texinfo # for the stand-alone Info reader
|
texinfo # for the stand-alone Info reader
|
||||||
]
|
]
|
||||||
++ stdenv.lib.optional (!stdenv.isAarch32) grub2;
|
++ lib.optional (!stdenv.isAarch32) grub2;
|
||||||
|
|
||||||
|
|
||||||
# GNU GRUB, where available.
|
# GNU GRUB, where available.
|
||||||
|
|
|
@ -4,8 +4,8 @@ stdenv.mkDerivation rec {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
nativeBuildInputs = [ cmake pkgconfig ];
|
nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
buildInputs = [ boost nix ];
|
buildInputs = [ boost nix ];
|
||||||
meta = {
|
meta = with lib; {
|
||||||
license = stdenv.lib.licenses.lgpl2Plus;
|
license = licenses.lgpl2Plus;
|
||||||
maintainers = with lib.maintainers; [ chkno ];
|
maintainers = with maintainers; [ chkno ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,18 +19,16 @@ nix-shell -E 'with import <nixpkgs> { }; brscan4-etc-files.override{netDevices=[
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
addNetDev = nd: ''
|
addNetDev = nd: ''
|
||||||
brsaneconfig4 -a \
|
brsaneconfig4 -a \
|
||||||
name="${nd.name}" \
|
name="${nd.name}" \
|
||||||
model="${nd.model}" \
|
model="${nd.model}" \
|
||||||
${if (hasAttr "nodename" nd && nd.nodename != null) then
|
${if (lib.hasAttr "nodename" nd && nd.nodename != null) then
|
||||||
''nodename="${nd.nodename}"'' else
|
''nodename="${nd.nodename}"'' else
|
||||||
''ip="${nd.ip}"''}'';
|
''ip="${nd.ip}"''}'';
|
||||||
addAllNetDev = xs: concatStringsSep "\n" (map addNetDev xs);
|
addAllNetDev = xs: lib.concatStringsSep "\n" (map addNetDev xs);
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
|
@ -61,11 +59,11 @@ stdenv.mkDerivation {
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
dontPatchELF = true;
|
dontPatchELF = true;
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
description = "Brother brscan4 sane backend driver etc files";
|
description = "Brother brscan4 sane backend driver etc files";
|
||||||
homepage = "http://www.brother.com";
|
homepage = "http://www.brother.com";
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = stdenv.lib.licenses.unfree;
|
license = licenses.unfree;
|
||||||
maintainers = with stdenv.lib.maintainers; [ jraygauthier ];
|
maintainers = with maintainers; [ jraygauthier ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ in
|
||||||
system.build.googleComputeImage = import ../../lib/make-disk-image.nix {
|
system.build.googleComputeImage = import ../../lib/make-disk-image.nix {
|
||||||
name = "google-compute-image";
|
name = "google-compute-image";
|
||||||
postVM = ''
|
postVM = ''
|
||||||
PATH=$PATH:${with pkgs; stdenv.lib.makeBinPath [ gnutar gzip ]}
|
PATH=$PATH:${with pkgs; lib.makeBinPath [ gnutar gzip ]}
|
||||||
pushd $out
|
pushd $out
|
||||||
mv $diskImage disk.raw
|
mv $diskImage disk.raw
|
||||||
tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw.tar.gz disk.raw
|
tar -Szcf nixos-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.raw.tar.gz disk.raw
|
||||||
|
|
|
@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, ...} :
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "searx";
|
name = "searx";
|
||||||
meta = with pkgs.stdenv.lib.maintainers; {
|
meta = with pkgs.lib.maintainers; {
|
||||||
maintainers = [ rnhmjoj ];
|
maintainers = [ rnhmjoj ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue