diff options
author | Artturin <Artturin@artturin.com> | 2021-07-01 06:14:58 +0300 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2021-07-08 19:04:49 +0300 |
commit | ec5c081715187867871c956e5745c82b5e5b9579 (patch) | |
tree | 31432b7598ef16fbdc6ab5bcbc85fca10f96d651 /pkgs/applications/misc/udevil | |
parent | 5ef8322daa6007ef0256460c0de339f70d718e50 (diff) | |
download | nixpkgs-ec5c081715187867871c956e5745c82b5e5b9579.tar nixpkgs-ec5c081715187867871c956e5745c82b5e5b9579.tar.gz nixpkgs-ec5c081715187867871c956e5745c82b5e5b9579.tar.bz2 nixpkgs-ec5c081715187867871c956e5745c82b5e5b9579.tar.lz nixpkgs-ec5c081715187867871c956e5745c82b5e5b9579.tar.xz nixpkgs-ec5c081715187867871c956e5745c82b5e5b9579.tar.zst nixpkgs-ec5c081715187867871c956e5745c82b5e5b9579.zip |
udevil: refactor and fix #35650
Diffstat (limited to 'pkgs/applications/misc/udevil')
-rw-r--r-- | pkgs/applications/misc/udevil/default.nix | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/pkgs/applications/misc/udevil/default.nix b/pkgs/applications/misc/udevil/default.nix index e83a5e9a2c7..9d1df5245ed 100644 --- a/pkgs/applications/misc/udevil/default.nix +++ b/pkgs/applications/misc/udevil/default.nix @@ -1,12 +1,20 @@ -{ lib, stdenv, fetchurl, intltool, glib, pkg-config, udev, util-linux, acl }: -stdenv.mkDerivation { - name = "udevil-0.4.4"; - src = fetchurl { - url = "https://github.com/IgnorantGuru/udevil/archive/0.4.4.tar.gz"; - sha256 = "0z1bhaayambrcn7bgnrqk445k50ifabmw8q4i9qj49nnbcvxhbxd"; +{ lib, stdenv, fetchFromGitHub, intltool, glib, pkg-config, udev, util-linux, acl }: + +stdenv.mkDerivation rec { + pname = "udevil"; + version = "0.4.4"; + + src = fetchFromGitHub { + owner = "IgnorantGuru"; + repo = "udevil"; + rev = version; + sha256 = "0nd44r8rbxifx4x4m24z5aji1c6k1fhw8cmf5s43wd5qys0bcdad"; }; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ intltool glib udev ]; + configurePhase = '' substituteInPlace src/Makefile.in --replace "-o root -g root" "" # do not set setuid bit in nix store @@ -19,11 +27,18 @@ stdenv.mkDerivation { --with-setfacl-prog=${acl.bin}/bin/setfacl \ --sysconfdir=$prefix/etc ''; + + postInstall = '' + substituteInPlace $out/lib/systemd/system/devmon@.service \ + --replace /usr/bin/devmon "$out/bin/devmon" + ''; + patches = [ ./device-info-sys-stat.patch ]; - meta = { + + meta = with lib; { description = "A command line Linux program which mounts and unmounts removable devices without a password, shows device info, and monitors device changes"; homepage = "https://ignorantguru.github.io/udevil/"; - platforms = lib.platforms.linux; - license = lib.licenses.gpl3; + platforms = platforms.linux; + license = licenses.gpl3Plus; }; } |