From 267f618da56d8ef12c3ada98d08c032549afadc2 Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 1 Mar 2022 10:28:39 +0300 Subject: [PATCH] build-support/makeDesktopItem: remove workaround, fix quoting --- pkgs/build-support/make-desktopitem/default.nix | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/pkgs/build-support/make-desktopitem/default.nix b/pkgs/build-support/make-desktopitem/default.nix index d831fe24d33b..e09fd0e20f22 100644 --- a/pkgs/build-support/make-desktopitem/default.nix +++ b/pkgs/build-support/make-desktopitem/default.nix @@ -34,11 +34,6 @@ , extraConfig ? {} # Additional values to be added literally to the final item, e.g. vendor extensions }: let - # FIXME: workaround until https://github.com/NixOS/nixpkgs/pull/162246 lands - cleanName = if lib.hasInfix " " name - then throw "makeDesktopItem: name must not contain spaces!" - else name; - # There are multiple places in the FDO spec that make "boolean" values actually tristate, # e.g. StartupNotify, where "unset" is literally defined as "do something reasonable". # So, handle null values separately. @@ -116,8 +111,8 @@ let content = [ mainSectionRendered ] ++ actionsRendered; in writeTextFile { - name = "${cleanName}.desktop"; - destination = "/share/applications/${cleanName}.desktop"; + name = "${name}.desktop"; + destination = "/share/applications/${name}.desktop"; text = builtins.concatStringsSep "\n" content; - checkPhase = "${buildPackages.desktop-file-utils}/bin/desktop-file-validate $target"; + checkPhase = ''${buildPackages.desktop-file-utils}/bin/desktop-file-validate "$target"''; }