summary refs log tree commit diff
path: root/pkgs/os-specific/linux/systemd/default.nix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-08-06 12:04:28 +0200
committerFlorian Klink <flokli@flokli.de>2020-08-13 20:51:39 +0200
commit38044aac5915e9fb0931ae76b27e73695e52a3de (patch)
treed8a49930fe0dacd08564e98f89897a2f9171cce6 /pkgs/os-specific/linux/systemd/default.nix
parentc81c10624c65927cd8008b71f878ce0b13829dab (diff)
downloadnixpkgs-38044aac5915e9fb0931ae76b27e73695e52a3de.tar
nixpkgs-38044aac5915e9fb0931ae76b27e73695e52a3de.tar.gz
nixpkgs-38044aac5915e9fb0931ae76b27e73695e52a3de.tar.bz2
nixpkgs-38044aac5915e9fb0931ae76b27e73695e52a3de.tar.lz
nixpkgs-38044aac5915e9fb0931ae76b27e73695e52a3de.tar.xz
nixpkgs-38044aac5915e9fb0931ae76b27e73695e52a3de.tar.zst
nixpkgs-38044aac5915e9fb0931ae76b27e73695e52a3de.zip
systemd: use tags as rev, update comment explaining updating workflow.
Diffstat (limited to 'pkgs/os-specific/linux/systemd/default.nix')
-rw-r--r--pkgs/os-specific/linux/systemd/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix
index 2609dc14bbc..54060b156f2 100644
--- a/pkgs/os-specific/linux/systemd/default.nix
+++ b/pkgs/os-specific/linux/systemd/default.nix
@@ -17,19 +17,24 @@
 , withKexectools ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) kexectools.meta.platforms, kexectools
 }:
 
-stdenv.mkDerivation {
+let
   version = "246";
+in stdenv.mkDerivation {
+  inherit version;
   pname = "systemd";
 
-  # When updating, use https://github.com/systemd/systemd-stable tree, not the development one!
-  # Also fresh patches should be cherry-picked from that tree to our current one.
+  # We use systemd/systemd-stable for src, and ship NixOS-specific patches inside nixpkgs directly
+  # This has proven to be less error-prone than the previous systemd fork.
   src = fetchFromGitHub {
     owner = "systemd";
     repo = "systemd-stable";
-    rev = "ae366f3acbc1a45504e9875099b17a7e1a221d03";
+    rev = "v${version}";
     sha256 = "0zrkyxrh5rm45f2l1rnjyv229bcyzawfw7c63jqxwix75px60dyw";
   };
 
+  # If these need to be regenerated, `git am path/to/00*.patch` them into a
+  # systemd worktree, rebase to the more recent systemd version, and export the
+  # patches again via `git format-patch v${version}`.
   patches = [
     ./0001-Start-device-units-for-uninitialised-encrypted-devic.patch
     ./0002-Don-t-try-to-unmount-nix-or-nix-store.patch