# Convert appimage to nixos package

**URL:** https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374
**Category:** Help
**Created:** [May 2, 2026, 3:34pm UTC](https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374 "2026-05-02T15:34:55Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![fredc30](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/f/439d5e/32.png) [@fredc30](https://discourse.nixos.org/u/fredc30)
#### Post date: [May 2, 2026, 3:34pm UTC](https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374/1 "2026-05-02T15:34:55Z")

</div>

Hello!!!

For a couple of day, I start to “play“ with my nixos config. That’s fun when you use debian daily.

Software install is comfortable, easy and efficient.

I tried to convert an appimage working fine with appimage-run. I read [https://wiki.nixos.org/wiki/Appimage](https://wiki.nixos.org/wiki/Appimage) and several wiki but still don’t understand where I should put this piece of 🤬 code in my config.

If you got a process or wiki that explains to newbies. You’re welcome. Or the page in the user manual… or just clue….

Thanks a lot!

---

<div class="post-metadata">

### Author: ![bitbloxhub](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bitbloxhub/32/35210_2.png) [@bitbloxhub](https://discourse.nixos.org/u/bitbloxhub)
#### Post date: [May 2, 2026, 5:14pm UTC](https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374/2 "2026-05-02T17:14:15Z")

</div>

I assume you mean the `appimageTools.wrapType2` block? I’d just replace the URL, hash, and meta, put it in `pkgs/<package-name>.nix`, and use `(pkgs.callPackage ./pkgs/<package-name>.nix { })` in `environment.systemPackages`. Out of curiosity, what app do you need this appimage for?

---

<div class="post-metadata">

### Author: ![fredc30](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/f/439d5e/32.png) [@fredc30](https://discourse.nixos.org/u/fredc30)
#### Post date: [May 2, 2026, 7:08pm UTC](https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374/3 "2026-05-02T19:08:01Z")

</div>

Thanks for your reply.

[Scenari opale for multisupport document](https://download.scenari.software/Opale/) a great tool for multi support ressources.

> and use (pkgs.callPackage ./pkgs/.nix { }) in environment.systemPackages

I’ll try …

Thanks !!

---

<div class="post-metadata">

### Author: ![fredc30](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/f/439d5e/32.png) [@fredc30](https://discourse.nixos.org/u/fredc30)
#### Post date: [May 2, 2026, 9:58pm UTC](https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374/4 "2026-05-02T21:58:59Z")

</div>

Great ! That’s a part of solution. Now I need to find how to create a .desktop created by the script software usually. The build failed because .desktop does’nt exist. But I can start the app by the terminal. That’s a great jump! Thanks!

---

<div class="post-metadata">

### Author: ![bitbloxhub](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bitbloxhub/32/35210_2.png) [@bitbloxhub](https://discourse.nixos.org/u/bitbloxhub)
#### Post date: [May 2, 2026, 10:26pm UTC](https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374/5 "2026-05-02T22:26:19Z")

</div>

Looks like you’ll want to:

1. Make `appimageContents` equal `appimageTools.extractType2 { inherit pname version src; };` in the let block.
2. Replace `extraInstallCommands` with this:

```bash
install -m 444 -D "${appimageContents}/opale25.desktop" "$out/share/applications/opale25.desktop"
substituteInPlace $out/share/applications/opale25.desktop \
  --replace-fail 'Exec=AppRun' 'Exec=opale'

```

Also you should know about the `--keep-failed` option to `nix-build` and `nix build`. It’s helpful for debugging stuff like this.

> **My working derivation**
>
> ```nix
> {
> lib,
> appimageTools,
> fetchurl,
> }:
> 
> let
> version = "25.1.2";
> pname = "opale";
> 
> src = fetchurl {
> url = "https://download.scenari.software/Opale@25.1.2/Opale25_en-US.AppImage";
> hash = "sha256-byB0eegSz5GpmD59IGok3U4RelHF5Q6Zuw4PBadxOgQ=";
> };
> 
> appimageContents = appimageTools.extractType2 { inherit pname version src; };
> in
> appimageTools.wrapType2 rec {
> inherit pname version src;
> 
> extraInstallCommands = ''
> install -m 444 -D "${appimageContents}/opale25.desktop" "$out/share/applications/opale25.desktop"
> substituteInPlace $out/share/applications/opale25.desktop \
> --replace-fail 'Exec=AppRun' 'Exec=opale'
> '';
> }
> 
> ```

---

<div class="post-metadata">

### Author: ![fredc30](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/f/439d5e/32.png) [@fredc30](https://discourse.nixos.org/u/fredc30)
#### Post date: [May 3, 2026, 8:22am UTC](https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374/6 "2026-05-03T08:22:43Z")

</div>

> [@bitbloxhub](#):
>
> Also you should know about the `--keep-failed` option to `nix-build` and `nix build`. It’s helpful for debugging stuff like this.

I use –show-trace but I just start and need learn the”useful” options 🙂

Now the build works properly! I got a white icon instead of opale icon but I’ll try to find.

I think I need to read and learn deeply 😂

---

<div class="post-metadata">

### Author: ![Data](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/d/cab0a1/32.png) [@Data](https://discourse.nixos.org/u/Data)
#### Post date: [May 3, 2026, 9:16am UTC](https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374/7 "2026-05-03T09:16:14Z")

</div>

Just made a symbolic link.

cd Desktop/  
ln -s /user/Appimage-Directory/File.Appimage DeskyopNameYouWant

---

<div class="post-metadata">

### Author: ![bitbloxhub](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bitbloxhub/32/35210_2.png) [@bitbloxhub](https://discourse.nixos.org/u/bitbloxhub)
#### Post date: [May 3, 2026, 7:47pm UTC](https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374/8 "2026-05-03T19:47:45Z")

</div>

> [@fredc30](#):
>
> I got a white icon instead of opale icon but I’ll try to find

Looks like you want to do something with symlinking/copying `${appimageContents}/usr/share/icons` to `$out` in`extraInstallCommands`.

From a quick github code search (Also something useful to know if you want to use nix, very helpful to see how others do things):

> <https://github.com/fufexan/nix-gaming/blob/57ab0906ff3b5de6297072d5ea20b02f2463be40/pkgs/titanfall/viper.nix#L60>

> <https://github.com/CatalystDevOrg/Catalyst/blob/2c7b82acc65dfe7619772f750f6b821f61f5e13b/package.nix#L47>

> <https://github.com/iynaix/dotfiles/blob/5204658efe6fd99faa56864f974bd7f1e4519fb8/modules/gui/helium/_package.nix#L24>

---

<div class="post-metadata">

### Author: ![TLATER](https://discourse.nixos.org/user_avatar/discourse.nixos.org/tlater/32/4257_2.png) [@TLATER](https://discourse.nixos.org/u/TLATER)
#### Post date: [May 4, 2026, 6:29am UTC](https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374/9 "2026-05-04T06:29:12Z")

</div>

> [@fredc30](#):
>
> I use –show-trace but I just start and need learn the”useful” options 🙂

`--show-trace` is almost always useless and just hides the actual issue under a few thousand lines of repetitive traces; I would recommend forgetting that flag exists.

I think I recall about two times the issue was actually hidden in traces instead of plainly obvious in the normal output over the last 10 years.

---

<div class="post-metadata">

### Author: ![fredc30](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/f/439d5e/32.png) [@fredc30](https://discourse.nixos.org/u/fredc30)
#### Post date: [May 4, 2026, 4:24pm UTC](https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374/10 "2026-05-04T16:24:00Z")

</div>

Thanks for your help!!!

Finally, works fine!!

After logout and login my account…

I think I should spend couple of hours to increase my knowledge on Nixos.

the code…

```auto
{ 
 lib, 
 appimageTools, 
 fetchurl, 
}: 

let 
 version = "25.1.2";
 pname = "opale25";

 src = fetchurl {
   url = "https://download.scenari.software/Opale@25.1.2/Opale25_en-US.AppImage";
   hash = "sha256-byB0eegSz5GpmD59IGok3U4RelHF5Q6Zuw4PBadxOgQ=";
 }; 

 appimageContents = appimageTools.extractType2 { inherit pname version src; };
in 
appimageTools.wrapType2 rec { 
 extraInstallCommands = ''
 inherit pname version src; 

   install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications 
   cp -r ${appimageContents}/usr/share/icons $out/share 
   substituteInPlace $out/share/applications/opale25.desktop \ 
     --replace-fail 'Exec=AppRun' 'Exec=${pname}' 
 ''; 
}

```

---

<div class="post-metadata">

### Author: ![waffle8946](https://discourse.nixos.org/user_avatar/discourse.nixos.org/waffle8946/32/27221_2.png) [@waffle8946](https://discourse.nixos.org/u/waffle8946)
#### Post date: [May 4, 2026, 5:53pm UTC](https://discourse.nixos.org/t/convert-appimage-to-nixos-package/77374/11 "2026-05-04T17:53:44Z")

</div>

> [@TLATER](#):
>
> I think I recall about two times the issue was actually hidden in traces instead of plainly obvious in the normal output over the last 10 years.

Unfortunately non-trivial module system errors are usually hidden and require it, but yes, it’s better to avoid by default unless you know the trimmed log is missing crucial info.
