uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
69
pkgs/tools/misc/debootstrap/default.nix
Normal file
69
pkgs/tools/misc/debootstrap/default.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{ lib, stdenv, fetchFromGitLab, dpkg, gawk, perl, wget, coreutils, util-linux
|
||||
, gnugrep, gnupg1, gnutar, gnused, gzip, makeWrapper }:
|
||||
# USAGE like this: debootstrap sid /tmp/target-chroot-directory
|
||||
# There is also cdebootstrap now. Is that easier to maintain?
|
||||
let binPath = lib.makeBinPath [
|
||||
coreutils
|
||||
dpkg
|
||||
gawk
|
||||
gnugrep
|
||||
gnupg1
|
||||
gnused
|
||||
gnutar
|
||||
gzip
|
||||
perl
|
||||
wget
|
||||
];
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "debootstrap";
|
||||
version = "1.0.126";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "salsa.debian.org";
|
||||
owner = "installer-team";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0hfx6k86kby4xf0xqskpllq00g159j4khh66hfi6dhcdb91dgyd7";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
substituteInPlace debootstrap \
|
||||
--replace 'CHROOT_CMD="chroot ' 'CHROOT_CMD="${coreutils}/bin/chroot ' \
|
||||
--replace 'CHROOT_CMD="unshare ' 'CHROOT_CMD="${util-linux}/bin/unshare ' \
|
||||
--replace /usr/bin/dpkg ${dpkg}/bin/dpkg \
|
||||
--replace '#!/bin/sh' '#!/bin/bash' \
|
||||
--subst-var-by VERSION ${version}
|
||||
|
||||
d=$out/share/debootstrap
|
||||
mkdir -p $out/{share/debootstrap,bin}
|
||||
|
||||
mv debootstrap $out/bin
|
||||
|
||||
cp -r . $d
|
||||
|
||||
wrapProgram $out/bin/debootstrap \
|
||||
--set PATH ${binPath} \
|
||||
--set-default DEBOOTSTRAP_DIR $d
|
||||
|
||||
mkdir -p $out/man/man8
|
||||
mv debootstrap.8 $out/man/man8
|
||||
|
||||
rm -rf $d/debian
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tool to create a Debian system in a chroot";
|
||||
homepage = "https://wiki.debian.org/Debootstrap";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ marcweber ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue