nixpkgs/pkgs/tools/security/super/default.nix
Silvan Mosberger 57bccb3cb8 treewide: http -> https sources (#42676)
* treewide: http -> https sources

This updates the source urls of all top-level packages from http to
https where possible.

* buildtorrent: fix url and tab -> spaces
2018-06-28 20:43:35 +02:00

44 lines
1.3 KiB
Nix

{ stdenv, fetchurl, fetchpatch }:
stdenv.mkDerivation rec {
name = "super-3.30.0";
src = fetchurl {
name = "${name}.tar.gz";
url = "https://www.ucolick.org/~will/RUE/super/${name}-tar.gz";
sha256 = "0k476f83w7f45y9jpyxwr00ikv1vhjiq0c26fgjch9hnv18icvwy";
};
prePatch = ''
# do not set sticky bit in nix store
substituteInPlace Makefile.in \
--replace "-o root" "" \
--replace 04755 755
'';
patches = [
(fetchpatch { url = http://anonscm.debian.org/cgit/users/robert/super.git/plain/debian/patches/14-Fix-unchecked-setuid-call.patch;
sha256 = "08m9hw4kyfjv0kqns1cqha4v5hkgp4s4z0q1rgif1fnk14xh7wqh";
})
];
NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE";
configureFlags = "--sysconfdir=/etc --localstatedir=/var";
installFlags = "sysconfdir=$(out)/etc localstatedir=$(TMPDIR)";
meta = {
homepage = http://www.ucolick.org/~will/;
description = "Allows users to execute scripts as if they were root";
longDescription =
''
This package provides two commands: 1) super, which allows
users to execute commands under a different uid/gid (specified
in /etc/super.tab); and 2) setuid, which allows root to
execute a command under a different uid.
'';
platforms = stdenv.lib.platforms.linux;
};
}