Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create .desktop files on the fly #3

Open
matthewbauer opened this issue Feb 6, 2017 · 1 comment
Open

Create .desktop files on the fly #3

matthewbauer opened this issue Feb 6, 2017 · 1 comment

Comments

@matthewbauer
Copy link
Member

matthewbauer commented Feb 6, 2017

See 43f0f04#commitcomment-20773045

Basically, some applications don't have good .desktop files, so we may need to create them custom.

@tomberek
Copy link
Collaborator

I find myself using things like this:

  app_src = input : pkgs.stdenv.mkDerivation rec {
     name="share";
     exec="bin/main";
     src = input;
     buildCommand = ''
       source $stdenv/setup
       cp -rL $src/. $out/
       chmod +w -R $out/
       substituteInPlace $out/share/applications/example.desktop \
         --replace '@icon@' $out/share/example-appimage \
         --replace '@out@' $out/bin \
         --replace '@exec@' $out/${exec}
       mkdir -p $out/nix-support
       echo "file binary-dist $out/${exec}" > $out/nix-support/hydra-build-products
       echo $(basename ${exec})> $out/nix-support/hydra-release-name
       chmod -w -R $out/
     '';
     system = builtins.currentSystem;
   };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants