
This reverts commit 65a333600d5c88a98d674f637d092807cfc12253. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e4587d75882aebc21a04bee960418f8ce9
66 lines
1.4 KiB
Nix
66 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
acl,
|
|
glib,
|
|
intltool,
|
|
pkg-config,
|
|
udev,
|
|
util-linux,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "udevil";
|
|
version = "0.4.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "IgnorantGuru";
|
|
repo = "udevil";
|
|
rev = version;
|
|
sha256 = "0nd44r8rbxifx4x4m24z5aji1c6k1fhw8cmf5s43wd5qys0bcdad";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
intltool
|
|
];
|
|
|
|
buildInputs = [
|
|
glib
|
|
udev
|
|
];
|
|
|
|
preConfigure = ''
|
|
substituteInPlace src/Makefile.in --replace "-o root -g root" ""
|
|
# do not set setuid bit in nix store
|
|
substituteInPlace src/Makefile.in --replace 4755 0755
|
|
'';
|
|
|
|
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"
|
|
];
|
|
|
|
postInstall = ''
|
|
substituteInPlace $out/lib/systemd/system/devmon@.service \
|
|
--replace /usr/bin/devmon "$out/bin/devmon"
|
|
'';
|
|
|
|
patches = [
|
|
# sys/stat.h header missing on src/device-info.h
|
|
./device-info-sys-stat.patch
|
|
];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://ignorantguru.github.io/udevil/";
|
|
description = "Mount without password";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|