mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-28 21:21:04 +01:00
Use pinnedPkgs only if initialBuild is true
This commit is contained in:
parent
89523d2268
commit
341df0f8fd
5 changed files with 21 additions and 20 deletions
|
|
@ -1,20 +1,21 @@
|
|||
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
||||
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
||||
|
||||
{ arch }:
|
||||
{ arch, initialBuild ? true }:
|
||||
|
||||
assert builtins.elem arch [ "aarch64" "i686" ];
|
||||
|
||||
let
|
||||
nixpkgs = import <nixpkgs> { };
|
||||
pkgs = import <nixpkgs> { };
|
||||
|
||||
pinnedPkgs = import ./pinned-pkgs.nix {
|
||||
pkgsList = import ./pkgs-list.nix {
|
||||
inherit arch;
|
||||
inherit (nixpkgs) fetchFromGitHub;
|
||||
inherit (pkgs) fetchFromGitHub;
|
||||
};
|
||||
in
|
||||
|
||||
import ./pkgs {
|
||||
inherit arch;
|
||||
inherit (pinnedPkgs) buildPkgs crossPkgs crossStaticPkgs;
|
||||
inherit arch initialBuild;
|
||||
inherit (pkgsList) pinnedPkgs crossPkgs crossStaticPkgs;
|
||||
buildPkgs = if initialBuild then pkgsList.pinnedPkgs else pkgs;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
let
|
||||
# head of nixos-19.03 as of 2019-09-15
|
||||
pinnedPkgs = fetchFromGitHub {
|
||||
pinnedPkgsSrc = fetchFromGitHub {
|
||||
owner = "NixOS";
|
||||
repo = "nixpkgs";
|
||||
rev = "2dfae8e22fde5032419c3027964c406508332974";
|
||||
|
|
@ -17,10 +17,10 @@ let
|
|||
overlays = [ ];
|
||||
};
|
||||
|
||||
buildPkgs = import pinnedPkgs defaultNixpkgsArgs;
|
||||
pinnedPkgs = import pinnedPkgsSrc defaultNixpkgsArgs;
|
||||
|
||||
overlayJpegNoStatic = self: super: {
|
||||
inherit (buildPkgs) libjpeg;
|
||||
inherit (pinnedPkgs) libjpeg;
|
||||
};
|
||||
|
||||
crossSystem = {
|
||||
|
|
@ -32,15 +32,15 @@ let
|
|||
in
|
||||
|
||||
{
|
||||
inherit buildPkgs;
|
||||
inherit pinnedPkgs;
|
||||
|
||||
crossPkgs = import pinnedPkgs ({ inherit crossSystem; } // defaultNixpkgsArgs);
|
||||
crossPkgs = import pinnedPkgsSrc ({ inherit crossSystem; } // defaultNixpkgsArgs);
|
||||
|
||||
crossStaticPkgs = import pinnedPkgs ({
|
||||
crossStaticPkgs = import pinnedPkgsSrc ({
|
||||
inherit crossSystem;
|
||||
|
||||
crossOverlays = [
|
||||
(import "${pinnedPkgs}/pkgs/top-level/static.nix")
|
||||
(import "${pinnedPkgsSrc}/pkgs/top-level/static.nix")
|
||||
overlayJpegNoStatic
|
||||
];
|
||||
} // defaultNixpkgsArgs);
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
||||
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
||||
|
||||
{ arch, buildPkgs, crossPkgs, crossStaticPkgs } @ args:
|
||||
{ arch, buildPkgs, crossPkgs, crossStaticPkgs, pinnedPkgs } @ args:
|
||||
|
||||
let
|
||||
callPackage = buildPkgs.lib.callPackageWith (args // pkgs);
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
||||
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
||||
|
||||
{ buildPkgs, crossStaticPkgs, talloc }:
|
||||
{ pinnedPkgs, crossStaticPkgs, talloc }:
|
||||
|
||||
crossStaticPkgs.stdenv.mkDerivation rec {
|
||||
pname = "proot-termux";
|
||||
version = "unstable-2019-09-05";
|
||||
|
||||
src = buildPkgs.fetchFromGitHub {
|
||||
src = pinnedPkgs.fetchFromGitHub {
|
||||
repo = "proot";
|
||||
owner = "termux";
|
||||
rev = "3ea655b1ae40bfa2ee612d45bf1e7ad97c4559f8";
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
# Licensed under GNU Lesser General Public License v3 or later, see COPYING.
|
||||
# Copyright (c) 2019 Alexander Sosedkin and other contributors, see AUTHORS.
|
||||
|
||||
{ buildPkgs, crossPkgs }:
|
||||
{ pinnedPkgs, crossPkgs }:
|
||||
|
||||
crossPkgs.stdenv.mkDerivation rec {
|
||||
name = "talloc-2.1.14";
|
||||
|
||||
src = buildPkgs.fetchurl {
|
||||
src = pinnedPkgs.fetchurl {
|
||||
url = "mirror://samba/talloc/${name}.tar.gz";
|
||||
sha256 = "1kk76dyav41ip7ddbbf04yfydb4jvywzi2ps0z2vla56aqkn11di";
|
||||
};
|
||||
|
||||
depsBuildBuild = [ buildPkgs.python2 buildPkgs.zlib ];
|
||||
depsBuildBuild = [ pinnedPkgs.python2 pinnedPkgs.zlib ];
|
||||
|
||||
buildDeps = [ crossPkgs.zlib ];
|
||||
|
||||
configurePhase = ''
|
||||
substituteInPlace buildtools/bin/waf \
|
||||
--replace "/usr/bin/env python" "${buildPkgs.python2}/bin/python"
|
||||
--replace "/usr/bin/env python" "${pinnedPkgs.python2}/bin/python"
|
||||
./configure --prefix=$out \
|
||||
--disable-rpath \
|
||||
--disable-python \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue