1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-09-11 12:05:26 +03:00

Fix stdenv.lib being removed

Deals with https://github.com/NixOS/nixpkgs/pull/111284
This commit is contained in:
Samuel Dionne-Riel 2021-02-02 05:34:48 -05:00
parent 8d76ca2ed2
commit 225ed39dad
11 changed files with 32 additions and 28 deletions

View File

@ -1,4 +1,5 @@
{ stdenv
, lib
, fetchurl
, mruby
@ -14,7 +15,7 @@ let
sha256 = "197g7qvrrijmajixa2h9c4jw26l36y8ig6qjb5d43qg4qykhqfcx";
};
inherit (stdenv.lib) concatMapStringsSep;
inherit (lib) concatMapStringsSep;
# Select libs we need from the libs folder.
libs = concatMapStringsSep " " (name: "${../lib}/${name}") [

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub
{ stdenv, lib, fetchFromGitHub
, flex, yacc, or1k-toolchain }:
stdenv.mkDerivation rec {
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
cp -v build/scp/scp.bin $out
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "Libre SCP firmware for Allwinner sunxi SoCs";
homepage = "https://github.com/crust-firmware/crust";
license = with licenses; [ bsd3 gpl2Only mit ];

View File

@ -1,4 +1,4 @@
{ stdenv, zstd, fetchurl }:
{ stdenv, lib, zstd, fetchurl }:
stdenv.mkDerivation {
pname = "pinephone-qfirehose";
@ -44,6 +44,6 @@ stdenv.mkDerivation {
#
# *Who are* the customers of Quectel company?
# *What is* totally open source code and public domain software?
license = with stdenv.lib.licenses; [ unfree ];
license = with lib.licenses; [ unfree ];
};
}

View File

@ -1,4 +1,4 @@
{ stdenv, bundlerEnv, glibcLocales }:
{ stdenv, lib, bundlerEnv, glibcLocales }:
let
env =
@ -10,7 +10,7 @@ let
"asciidoctor"
];
meta = with stdenv.lib; {
meta = with lib; {
description = "Custom documentation building pipeline built on asciidoctor";
license = licenses.mit; # Same as mobile-nixos
maintainers = with maintainers; [ samueldr ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ stdenv, lib, fetchFromGitHub }:
stdenv.mkDerivation {
pname = "bootlogd";
@ -17,7 +17,7 @@ stdenv.mkDerivation {
"PREFIX=${placeholder "out"}"
];
meta = with stdenv.lib; {
meta = with lib; {
license = licenses.gpl2;
};
}

View File

@ -1,4 +1,5 @@
{ stdenv
, lib
, fetchFromGitHub
, dtc
}:
@ -28,7 +29,7 @@ stdenv.mkDerivation {
chmod +x $out/bin/dtbTool-exynos
'';
meta = with stdenv.lib; {
meta = with lib; {
license = licenses.bsd3;
};
}

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ stdenv, lib, fetchFromGitHub }:
stdenv.mkDerivation {
pname = "hardshutdown";
@ -15,7 +15,7 @@ stdenv.mkDerivation {
"PREFIX=${placeholder "out"}"
];
meta = with stdenv.lib; {
meta = with lib; {
description = "Single-call binary handling shutdown/reboot syscalls";
license = licenses.gpl2;
};

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, zlib }:
{ stdenv, lib, fetchgit, zlib }:
stdenv.mkDerivation {
pname = "make_ext4fs";
@ -25,7 +25,7 @@ stdenv.mkDerivation {
cp make_ext4fs $out/bin
'';
meta = with stdenv.lib; {
meta = with lib; {
homepage = https://git.openwrt.org/?p=project/make_ext4fs.git;
description = "Standalone fork of Android make_ext4fs utility";
license = licenses.asl20;

View File

@ -15,6 +15,7 @@
# This is the callPackage signature.
# These are dependencies for dependency injection.
{ stdenv
, lib
, path
, buildPackages
@ -52,8 +53,8 @@ let
modDirify = v: v;
# Shortcuts
inherit (stdenv.lib) optionals optional optionalString;
inherit (stdenv.hostPlatform) platform;
inherit (lib) optionals optional optionalString;
maybeString = str: optionalString (str != null) str;
in
@ -171,12 +172,12 @@ stdenv.mkDerivation (inputArgs // {
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr ]
++ optional (platform.kernelTarget == "uImage") buildPackages.ubootTools
++ optional (stdenv.lib.versionAtLeast version "4.14" && stdenv.lib.versionOlder version "5.8") libelf
++ optional (stdenv.lib.versionAtLeast version "4.15") utillinux
++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]
++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]
++ optional (stdenv.lib.versionAtLeast version "5.2") cpio
++ optional (stdenv.lib.versionAtLeast version "5.8") elfutils
++ optional (lib.versionAtLeast version "4.14" && lib.versionOlder version "5.8") libelf
++ optional (lib.versionAtLeast version "4.15") utillinux
++ optionals (lib.versionAtLeast version "4.16") [ bison flex ]
++ optionals (lib.versionAtLeast version "4.16") [ bison flex ]
++ optional (lib.versionAtLeast version "5.2") cpio
++ optional (lib.versionAtLeast version "5.8") elfutils
# Mobile NixOS inputs.
# While some kernels might not need those, most will.
++ [ dtc ]
@ -188,7 +189,7 @@ stdenv.mkDerivation (inputArgs // {
patches =
map (p: p.patch) kernelPatches
# Required for deterministic builds along with some postPatch magic.
++ optional (stdenv.lib.versionAtLeast version "4.13") "${nixosKernelPath}/randstruct-provide-seed.patch"
++ optional (lib.versionAtLeast version "4.13") "${nixosKernelPath}/randstruct-provide-seed.patch"
++ patches
;
@ -412,9 +413,9 @@ stdenv.mkDerivation (inputArgs // {
"KBUILD_BUILD_VERSION=1-mobile-nixos"
]
# Use platform-specific flags
++ stdenv.lib.optionals (platform ? kernelMakeFlags) platform.kernelMakeFlags
++ lib.optionals (platform ? kernelMakeFlags) platform.kernelMakeFlags
# Mark as cross-compilation
++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ "CROSS_COMPILE=${stdenv.cc.targetPrefix}" ]
# User-provided makeFlags
++ makeFlags
# Install flags

View File

@ -10,6 +10,7 @@ let
];
in
{ stdenv
, lib
, buildPackages
, ruby
, bison
@ -39,7 +40,7 @@ in
}:
let
inherit (stdenv.lib)
inherit (lib)
concatMapStringsSep
concatStringsSep
isDerivation
@ -227,7 +228,7 @@ stdenv.mkDerivation rec {
inherit debug;
};
meta = with stdenv.lib; {
meta = with lib; {
description = "An embeddable implementation of the Ruby language";
homepage = https://mruby.org;
maintainers = [ maintainers.nicknovitski ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, dtc }:
{ stdenv, lib, fetchFromGitHub, dtc }:
stdenv.mkDerivation {
pname = "ufdt-apply-overlay";
@ -27,7 +27,7 @@ stdenv.mkDerivation {
echo "(already installed)"
'';
meta = with stdenv.lib; {
meta = with lib; {
# up-upstream: https://android.googlesource.com/platform/system/libufdt/
homepage = https://github.com/hybris-mobian/android-platform-system-libufdt;
description = "Standalone fork of platform/system/libufdt";