Skip to content

Commit

Permalink
grml2usb: init at 0.16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhoeg committed Oct 22, 2018
1 parent 45a419a commit 45b528a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
59 changes: 59 additions & 0 deletions pkgs/tools/system/grml2usb/default.nix
@@ -0,0 +1,59 @@
{ stdenv, lib, fetchFromGitHub, asciidoc, docbook_xsl_ns, makeWrapper, libxslt
, grub2, python2, syslinux, xorriso }:

stdenv.mkDerivation rec {
name = "grml2usb-${version}";
version = "0.16.1";

src = fetchFromGitHub {
owner = "grml";
repo = "grml2usb";
rev = "v${version}";
sha256 = "0yaykjv26812vdch8vqj8il34hagb4ngnvscxbd917kwchfqk2ph";
};

postPatch = ''
substituteInPlace Makefile \
--replace /usr/share/xml/docbook/stylesheet/nwalsh/ \
${docbook_xsl_ns}/xml/xsl/docbook/
substituteInPlace grml2iso \
--replace '$0' grml2iso
substituteInPlace grml2usb \
--replace '%prog' grml2usb \
--replace '/usr/bin/env python' ${python2.interpreter}
'';

nativeBuildInputs = [ asciidoc docbook_xsl_ns makeWrapper libxslt ];

preBuild = ''
pushd mbr
make
popd
'';

installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin grml2{iso,usb}
install -Dm644 -t $out/share/man/man8 grml*.8
install -Dm644 -t $out/share/grml2usb/mbr mbr/mbr{ldr,mgr,mgr.elf}
cp -r grub/ $out/share/grml2usb/
runHook postInstall
'';

postFixup = ''
for f in $out/bin/* ; do
wrapProgram $f \
--prefix PATH : ${lib.makeBinPath [ grub2 syslinux xorriso ]}
done
'';

meta = with stdenv.lib; {
description = "Install Grml system to USB devices";
homepage = https://www.grml.org;
license = licenses.gpl2;
platforms = platforms.all;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -2949,6 +2949,8 @@ with pkgs;

gptfdisk = callPackage ../tools/system/gptfdisk { };

grml2usb = callPackage ../tools/system/grml2usb { };

grafx2 = callPackage ../applications/graphics/grafx2 {};

grails = callPackage ../development/web/grails { jdk = null; };
Expand Down

0 comments on commit 45b528a

Please sign in to comment.