Skip to content

Instantly share code, notes, and snippets.

@charles-dyfis-net
Created September 23, 2018 21:13
Show Gist options
  • Save charles-dyfis-net/c0413c2220a76b40a00ec093724ce768 to your computer and use it in GitHub Desktop.
Save charles-dyfis-net/c0413c2220a76b40a00ec093724ce768 to your computer and use it in GitHub Desktop.
nix recipe for nwipe compiled with musl rather than glibc
{ pkgs ? import <nixpkgs> { overlays = [
(self: super: {
systemd = null;
})
];}}:
let
lvm2WithoutSystemd = (pkgs.pkgsMusl.lvm2.override { utillinux = null; }).overrideAttrs(oldAttrs: {
configureFlags = oldAttrs.configureFlags ++ [
"--disable-udev_rules"
"--disable-udev_sync"
];
preConfigure =
''
sed -i /DEFAULT_SYS_DIR/d Makefile.in
sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in
'';
postInstall = "";
});
partedWithoutSystemd = pkgs.pkgsMusl.parted.override { lvm2 = lvm2WithoutSystemd; };
nwipe = pkgs.pkgsMusl.nwipe.override { parted = partedWithoutSystemd; };
in
nwipe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment