diff --git a/flake.nix b/flake.nix index 8172cfe..ab155e0 100644 --- a/flake.nix +++ b/flake.nix @@ -86,11 +86,26 @@ # Build the actual crate itself, reusing the dependency # artifacts from above. - myCrate = craneLib.buildPackage (commonArgs // { inherit cargoArtifacts; }); + myCrate = craneLib.buildPackage ( + commonArgs + // { + inherit cargoArtifacts; + } + // { + postInstall = '' + mkdir -p $out/share/applications + cp ${./sheet-organizer.desktop} $out/share/applications/sheet-organizer.desktop + + mkdir -p $out/share/icons + cp ${./sheet-organizer.png} $out/share/icons/sheet-organizer.png + ''; + } + ); # Also run the crate tests under cargo-tarpaulin so that we can keep # track of code coverage myCrateCoverage = craneLib.cargoTarpaulin (commonArgs // { inherit cargoArtifacts; }); + in { packages.default = myCrate; diff --git a/sheet-organizer.desktop b/sheet-organizer.desktop new file mode 100644 index 0000000..bb020b5 --- /dev/null +++ b/sheet-organizer.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Type=Application +Terminal=false +Name=Sheet Organizer +Icon=sheet-organizer +Exec=sheet-organizer diff --git a/sheet-organizer.png b/sheet-organizer.png new file mode 100644 index 0000000..e704691 Binary files /dev/null and b/sheet-organizer.png differ