I am trying to use the existing notion-app-enhanced package as a base for a more up to date version of notion. I found a fork of notion-repackaged that fits that purpose and have created this overrideAttrs using the documentation found here https://nixos.org/manual/nixpkgs/stable/#sec-pkg-overrideDerivation
Changing it to read pkgs.fetchurl did resolve that issue. But I ran into other issues, so decided to go another route.
I created notion-app.nix with contents
{ appimageTools, lib, fetchurl }:
let
pname = "notion-app";
version = "3.0.0-1";
src = fetchurl {
url = "https://github.com/aokellermann/notion-repackaged/releases/download/v${version}/Notion-${version}.AppImage";
sha256 = "4ca2dbc3e90e8166037f420d54a7cfe8373e27707fdee999e6458044b66786d0";
};
appimageContents = appimageTools.extract { inherit pname version src; };
in appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
meta = with lib; {
description = "Notion Desktop builds for Windows, MacOS and Linux.";
homepage = "https://github.com/aokellermann/notion-repackaged";
license = licenses.unfree;
maintainers = with maintainers; [ skane ];
platforms = [ "x86_64-linux" ];
mainProgram = "notion-app";
};
}
And then referenced that in my configuration.nix
environment.systemPackages = with pkgs; [
(pkgs.callPackage ./notion-app.nix {})
];
And this successfully grabbed and created the new application.
I may try and fork the repo and see if I can get an even more up to date version of Notion running now that I know how this end of it works. If I do I’ll probably make a PR into the nixpkgs repo.