nixpkgs/pkgs/os-specific/linux/firejail/default.nix

43 lines
1.2 KiB
Nix
Raw Normal View History

2016-02-14 14:49:27 +01:00
{stdenv, fetchurl, which}:
let
s = # Generated upstream information
rec {
baseName="firejail";
2017-01-02 17:18:09 +01:00
version="0.9.44.2";
name="${baseName}-${version}";
2017-01-02 17:18:09 +01:00
hash="0lc8vq6lj0669q4vx08m3dzqjayhl0cmm7n3qi4k18ys8ccyzbf5";
url="https://kent.dl.sourceforge.net/project/firejail/firejail/firejail-0.9.44.2.tar.xz";
sha256="0lc8vq6lj0669q4vx08m3dzqjayhl0cmm7n3qi4k18ys8ccyzbf5";
};
buildInputs = [
2016-02-14 14:49:27 +01:00
which
];
in
stdenv.mkDerivation {
inherit (s) name version;
inherit buildInputs;
src = fetchurl {
inherit (s) url sha256;
2016-08-10 19:34:58 +02:00
name = "${s.name}.tar.bz2";
};
preConfigure = ''
sed -e 's@/bin/bash@${stdenv.shell}@g' -i $( grep -lr /bin/bash .)
2016-02-14 14:49:27 +01:00
sed -e "s@/bin/cp@$(which cp)@g" -i $( grep -lr /bin/cp .)
'';
2014-11-02 20:59:32 +01:00
preBuild = ''
sed -e "s@/etc/@$out/etc/@g" -i Makefile
'';
meta = {
inherit (s) version;
description = ''Namespace-based sandboxing tool for Linux'';
license = stdenv.lib.licenses.gpl2Plus ;
maintainers = [stdenv.lib.maintainers.raskin];
platforms = stdenv.lib.platforms.linux;
homepage = "http://l3net.wordpress.com/projects/firejail/";
downloadPage = "http://sourceforge.net/projects/firejail/files/firejail/";
};
}