diff options
author | Nikolay Amiantov <ab@fmap.me> | 2022-01-10 16:39:16 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2022-02-05 23:33:10 +0300 |
commit | 077d0524ccfec44c00b469833ad7b5d8a984e7f6 (patch) | |
tree | 1e86c419616a52abdc04b6d1fc36839a251d7f39 /pkgs/tools/virtualization | |
parent | c3f278bfba45fb496b5cb136f6be0eeb4c0b6696 (diff) | |
download | nixpkgs-077d0524ccfec44c00b469833ad7b5d8a984e7f6.tar nixpkgs-077d0524ccfec44c00b469833ad7b5d8a984e7f6.tar.gz nixpkgs-077d0524ccfec44c00b469833ad7b5d8a984e7f6.tar.bz2 nixpkgs-077d0524ccfec44c00b469833ad7b5d8a984e7f6.tar.lz nixpkgs-077d0524ccfec44c00b469833ad7b5d8a984e7f6.tar.xz nixpkgs-077d0524ccfec44c00b469833ad7b5d8a984e7f6.tar.zst nixpkgs-077d0524ccfec44c00b469833ad7b5d8a984e7f6.zip |
google-compute-engine-oslogin: 20210429.00 -> 20211213.00
* Rename to google-guest-oslogin; * Fix systemd service; * Small cleanup.
Diffstat (limited to 'pkgs/tools/virtualization')
-rw-r--r-- | pkgs/tools/virtualization/google-guest-oslogin/default.nix (renamed from pkgs/tools/virtualization/google-compute-engine-oslogin/default.nix) | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/pkgs/tools/virtualization/google-compute-engine-oslogin/default.nix b/pkgs/tools/virtualization/google-guest-oslogin/default.nix index 0718e437b06..6dceeecfd6e 100644 --- a/pkgs/tools/virtualization/google-compute-engine-oslogin/default.nix +++ b/pkgs/tools/virtualization/google-guest-oslogin/default.nix @@ -9,38 +9,39 @@ }: stdenv.mkDerivation rec { - pname = "google-compute-engine-oslogin"; - version = "20210429.00"; + pname = "google-guest-oslogin"; + version = "20211213.00"; src = fetchFromGitHub { owner = "GoogleCloudPlatform"; repo = "guest-oslogin"; rev = version; - sha256 = "eHAg9K5oxcygEzqaac81jSFHF+zsW6uB7q2Kfo9hSrA="; + sha256 = "sha256-8RuLYdWfk8zPfoF06r5E/6eHQ7tziZbgGhZlLCUW600="; }; postPatch = '' # change sudoers dir from /var/google-sudoers.d to /run/google-sudoers.d (managed through systemd-tmpfiles) substituteInPlace src/pam/pam_oslogin_admin.cc --replace /var/google-sudoers.d /run/google-sudoers.d # fix "User foo not allowed because shell /bin/bash does not exist" - substituteInPlace src/include/compat.h --replace /bin/bash ${bashInteractive}/bin/bash + substituteInPlace src/include/compat.h --replace /bin/bash /run/current-system/sw/bin/bash ''; - buildInputs = [ curl.dev pam ]; + buildInputs = [ curl.dev pam json_c ]; - NIX_CFLAGS_COMPILE = "-I${json_c.dev}/include/json-c"; - NIX_CFLAGS_LINK = "-L${json_c}/lib"; + NIX_CFLAGS_COMPILE = [ "-I${json_c.dev}/include/json-c" ]; makeFlags = [ "VERSION=${version}" - "DESTDIR=${placeholder "out"}" - "PREFIX=/" - "BINDIR=/bin" - "LIBDIR=/lib" - "PAMDIR=/lib" - "MANDIR=/share/man" + "PREFIX=$(out)" + "MANDIR=$(out)/share/man" + "SYSTEMDDIR=$(out)/etc/systemd/system" + "PRESETDIR=$(out)/etc/systemd/system-preset" ]; + postInstall = '' + sed -i "s,/usr/bin/,$out/bin/,g" $out/etc/systemd/system/google-oslogin-cache.service + ''; + enableParallelBuilding = true; passthru.tests = { @@ -51,6 +52,7 @@ stdenv.mkDerivation rec { homepage = "https://github.com/GoogleCloudPlatform/compute-image-packages"; description = "OS Login Guest Environment for Google Compute Engine"; license = licenses.asl20; + platforms = platforms.linux; maintainers = with maintainers; [ flokli ]; }; } |