about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/linux/oddjob/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/oddjob/default.nix')
-rw-r--r--nixpkgs/pkgs/os-specific/linux/oddjob/default.nix60
1 files changed, 60 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/oddjob/default.nix b/nixpkgs/pkgs/os-specific/linux/oddjob/default.nix
new file mode 100644
index 000000000000..bcbea9086488
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/oddjob/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, fetchurl
+, stdenv
+, autoreconfHook
+, dbus
+, libxml2
+, pam
+, pkg-config
+, systemd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "oddjob";
+  version = "0.34.7";
+
+  src = fetchurl {
+     url = "https://pagure.io/oddjob/archive/${pname}-${version}/oddjob-${pname}-${version}.tar.gz";
+     hash = "sha256-SUOsMH55HtEsk5rX0CXK0apDObTj738FGOaL5xZRnIM=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    pkg-config
+  ];
+
+  buildInputs =[
+    libxml2
+    dbus
+    pam
+    systemd
+  ];
+
+  postPatch = ''
+    substituteInPlace configure.ac \
+      --replace 'SYSTEMDSYSTEMUNITDIR=`pkg-config --variable=systemdsystemunitdir systemd 2> /dev/null`' "SYSTEMDSYSTEMUNITDIR=${placeholder "out"}" \
+      --replace 'SYSTEMDSYSTEMUNITDIR=`pkg-config --variable=systemdsystemunitdir systemd`' "SYSTEMDSYSTEMUNITDIR=${placeholder "out"}"
+  '';
+
+  configureFlags = [
+    "--prefix=${placeholder "out"}"
+    "--sysconfdir=${placeholder "out"}/etc"
+    "--with-selinux-acls=no"
+    "--with-selinux-labels=no"
+    "--disable-systemd"
+  ];
+
+  postConfigure = ''
+    substituteInPlace src/oddjobd.c \
+      --replace "globals.selinux_enabled" "FALSE"
+  '';
+
+  meta = with lib; {
+    description = "Odd Job Daemon";
+    homepage = "https://pagure.io/oddjob";
+    changelog = "https://pagure.io/oddjob/blob/oddjob-${version}/f/ChangeLog";
+    license = licenses.bsd0;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ SohamG ];
+  };
+}