nixpkgs/pkgs/applications/misc/udevil/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

63 lines
1.4 KiB
Nix
Raw Normal View History

2022-01-04 22:52:28 +00:00
{ lib
, stdenv
, fetchFromGitHub
, acl
, glib
, intltool
, pkg-config
, udev
, util-linux
}:
2021-07-01 03:14:58 +00:00
stdenv.mkDerivation rec {
pname = "udevil";
version = "0.4.4";
src = fetchFromGitHub {
owner = "IgnorantGuru";
repo = "udevil";
rev = version;
sha256 = "0nd44r8rbxifx4x4m24z5aji1c6k1fhw8cmf5s43wd5qys0bcdad";
2015-07-19 12:21:30 +00:00
};
2021-07-01 03:14:58 +00:00
nativeBuildInputs = [ pkg-config ];
2021-07-01 03:14:58 +00:00
2022-01-04 22:52:28 +00:00
buildInputs = [
glib
intltool
udev
];
2021-07-01 03:14:58 +00:00
2022-01-04 22:52:28 +00:00
preConfigure = ''
2015-07-19 12:21:30 +00:00
substituteInPlace src/Makefile.in --replace "-o root -g root" ""
2017-06-17 09:47:42 +00:00
# do not set setuid bit in nix store
substituteInPlace src/Makefile.in --replace 4755 0755
2015-07-19 12:21:30 +00:00
'';
2021-07-01 03:14:58 +00:00
2022-01-04 22:52:28 +00:00
configureFlags = [
"--with-mount-prog=${util-linux}/bin/mount"
"--with-umount-prog=${util-linux}/bin/umount"
"--with-losetup-prog=${util-linux}/bin/losetup"
"--with-setfacl-prog=${acl.bin}/bin/setfacl"
"--sysconfdir=${placeholder "out"}/etc"
];
2021-07-01 03:14:58 +00:00
postInstall = ''
substituteInPlace $out/lib/systemd/system/devmon@.service \
--replace /usr/bin/devmon "$out/bin/devmon"
'';
2022-01-04 22:52:28 +00:00
patches = [
# sys/stat.h header missing on src/device-info.h
./device-info-sys-stat.patch
];
2021-07-01 03:14:58 +00:00
meta = with lib; {
homepage = "https://ignorantguru.github.io/udevil/";
2022-01-04 22:52:28 +00:00
description = "Mount without password";
2021-07-01 03:14:58 +00:00
license = licenses.gpl3Plus;
2022-01-04 22:52:28 +00:00
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.linux;
2015-07-19 12:21:30 +00:00
};
}