diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-12-01 19:00:09 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-12-01 19:00:09 +0100 |
commit | 9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d (patch) | |
tree | 4368f9e4cb2d5b93a956c085337e45cb70f1e331 /nixpkgs/pkgs/desktops/deepin/core/dde-session/default.nix | |
parent | a9cbfb6941b47d6f50129e6e36927882392daed7 (diff) | |
parent | 2344fe1da14cb08b0c18743b207995f9b8597915 (diff) | |
download | nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.gz nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.bz2 nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.lz nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.xz nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.tar.zst nixlib-9e9b07490d5bab5d115c66b80bdb10ff0c11ed8d.zip |
Merge https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/desktops/deepin/core/dde-session/default.nix')
-rw-r--r-- | nixpkgs/pkgs/desktops/deepin/core/dde-session/default.nix | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/desktops/deepin/core/dde-session/default.nix b/nixpkgs/pkgs/desktops/deepin/core/dde-session/default.nix new file mode 100644 index 000000000000..72ae99f8c843 --- /dev/null +++ b/nixpkgs/pkgs/desktops/deepin/core/dde-session/default.nix @@ -0,0 +1,69 @@ +{ stdenv +, lib +, fetchFromGitHub +, cmake +, pkg-config +, wrapQtAppsHook +, qtbase +, dtkcore +, gsettings-qt +, libsecret +, xorg +, systemd +, dde-polkit-agent +}: + +stdenv.mkDerivation rec { + pname = "dde-session"; + version = "1.1.9"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + hash = "sha256-CyHvvNALXe4fOMjD48By/iaU6/xNUhH9yG19Ob3bHy0="; + }; + + postPatch = '' + # Avoid using absolute path to distinguish applications + substituteInPlace src/dde-session/impl/sessionmanager.cpp \ + --replace 'file.readAll().startsWith("/usr/bin/dde-lock")' 'file.readAll().contains("dde-lock")' \ + + substituteInPlace systemd/dde-session-initialized.target.wants/dde-polkit-agent.service \ + --replace "/usr/lib/polkit-1-dde" "${dde-polkit-agent}/lib/polkit-1-dde" + + for file in $(grep -rl "/usr/lib/deepin-daemon"); do + substituteInPlace $file --replace "/usr/lib/deepin-daemon" "/run/current-system/sw/lib/deepin-daemon" + done + + for file in $(grep -rl "/usr/bin"); do + substituteInPlace $file --replace "/usr/bin/" "/run/current-system/sw/bin/" + done + ''; + + nativeBuildInputs = [ + cmake + pkg-config + wrapQtAppsHook + ]; + + buildInputs = [ + qtbase + dtkcore + gsettings-qt + libsecret + xorg.libXcursor + systemd + ]; + + # FIXME: dde-wayland always exits abnormally + passthru.providedSessions = [ "dde-x11" ]; + + meta = with lib; { + description = "New deepin session based on systemd and existing projects"; + homepage = "https://github.com/linuxdeepin/dde-session"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = teams.deepin.members; + }; +} |