-
-
Save timclassic/242e01f1a3768af1b1d3d418a940bff0 to your computer and use it in GitHub Desktop.
Dummy setcap(8)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Various package modifications to work around bugs or lack of | |
# features in lx-brand. Ideally I will upstream proper fixes for | |
# all of these. | |
nixpkgs.config.packageOverrides = pkgs: rec { | |
# No capability support, so we override the libcap package to | |
# provide a dummy setcap(8) | |
libcap = let | |
setcap-noop = pkgs.writeTextFile { | |
name = "setcap-noop"; | |
text = '' | |
#!/bin/sh | |
echo "WARNING: Treating setcap(8) as a no-op on lx-brand" >/dev/stderr | |
''; | |
}; | |
in pkgs.libcap.overrideAttrs (oldAttrs: { | |
postFixup = '' | |
mv "$out"/bin/setcap "$out"/bin/setcap.DISABLED | |
cp ${setcap-noop} "$out"/bin/setcap | |
chmod a+x "$out"/bin/setcap | |
''; | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment