Skip to content

Instantly share code, notes, and snippets.

@davidtwco
Created June 10, 2019 16:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidtwco/48e6b4e5ce03c352a1a885ef67adf35e to your computer and use it in GitHub Desktop.
Save davidtwco/48e6b4e5ce03c352a1a885ef67adf35e to your computer and use it in GitHub Desktop.
{ appimageTools, fetchurl, lib, gsettings-desktop-schemas, gtk3 }:
let
pname = "wootility";
version = "3.3.1";
in appimageTools.wrapType2 rec {
name = "${pname}-${version}";
src = fetchurl {
url = "https://s3.eu-west-2.amazonaws.com/wooting-update/wootility-linux-latest/wootility-${version}-x86_64.AppImage";
sha256 = "1vpgym6m1r6pdqs0p1dxq0b65f5ly6mx8aid96i13kbqn1d7livq";
};
profile = ''
export LC_ALL=C.UTF-8
export XDG_DATA_DIRS="${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS"
'';
multiPkgs = null;
extraPkgs = appimageTools.defaultFhsEnvArgs.multiPkgs;
extraInstallCommands = "mv $out/bin/{${name},${pname}}";
meta = with lib; {
homepage = https://wooting.io/wootility;
description = "Wootility is customization and management software for Wooting keyboards.";
platforms = platforms.linux;
license = licenses.unknown;
maintainers = with maintainers; [ davidtwco ];
};
}
@davidtwco
Copy link
Author

error: 'wrapType2' at /nix/var/nix/profiles/per-user/root/channels/nixos/pkgs/build-support/appimage/default.nix:56:15 called with unexpected argument 'profile', at /etc/nixos/packages/wootility.nix:6:4

@davidtwco
Copy link
Author

wrapType2 = args@{ name, src, extraPkgs ? pkgs: [] }: wrapAppImage {
    inherit name extraPkgs;
    src = extractType2 { inherit name src; };
  };

@Noir-
Copy link

Noir- commented May 25, 2020

I'm trying to use this as a starting point for wrapping an app but it fails.

$ nix-env -f ./mystuff.nix -i
error: cannot auto-call a function that has an argument without a default value ('appimageTools')

Do you have an updated version for this?

@davidtwco
Copy link
Author

@Noir- here's a link to the upstream version so you can see how it has changed. This file expects to be passed to pkgs.callPackage, which will provide the arguments - not with nix-env.

@Noir-
Copy link

Noir- commented May 25, 2020

Thanks a lot! First of all I didn't notice that the Wootility is already in the repos! This rocks 👍
Second, you helped me to solve my problem. I combined your template with this idea from reddit to have some custom packages for my environment: https://www.reddit.com/r/NixOS/comments/4btjnf/fully_setting_up_a_custom_private_nix_repository/
Learned a lot today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment