added documentation and dev tools
This commit is contained in:
parent
c148aa428f
commit
8170151c84
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,4 @@
|
|||||||
result
|
result
|
||||||
|
*.AppImage
|
||||||
|
|
||||||
|
.direnv/
|
||||||
|
23
README.md
Normal file
23
README.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Story Architect Flake
|
||||||
|
|
||||||
|
This flake packages the [Story Architect](https://github.com/story-apps/starc) AppImage.
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
```txt
|
||||||
|
nix build
|
||||||
|
```
|
||||||
|
|
||||||
|
## Developing
|
||||||
|
|
||||||
|
```txt
|
||||||
|
nix develop
|
||||||
|
nix run .#dev
|
||||||
|
```
|
||||||
|
|
||||||
|
The `nix run .#dev` command will download the AppImage used for building.
|
||||||
|
It can then be inspected locally with tools like `file` and `appimage-run`, which are offered by the `nix develop` command.
|
||||||
|
|
||||||
|
### Resources
|
||||||
|
|
||||||
|
* [Nix Manual](https://nixos.org/manual/nixpkgs/stable/#sec-pkgs-appimageTools)
|
28
flake.nix
28
flake.nix
@ -20,6 +20,11 @@
|
|||||||
sha256 = "sha256-wixqb1cV+WEhgxsl2CeOjrid4P0daHqh0O40h2iPst4=";
|
sha256 = "sha256-wixqb1cV+WEhgxsl2CeOjrid4P0daHqh0O40h2iPst4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
appimage = pkgs.fetchurl {
|
||||||
|
url = "https://github.com/story-apps/starc/releases/download/v${version}/starc-setup.AppImage";
|
||||||
|
sha256 = "sha256-KLawvuLyqd7aPidH3ghr7mLl9NFQ7nduhnxAq0RpToQ=";
|
||||||
|
};
|
||||||
|
|
||||||
desktopItem = pkgs.makeDesktopItem {
|
desktopItem = pkgs.makeDesktopItem {
|
||||||
exec = name;
|
exec = name;
|
||||||
|
|
||||||
@ -39,10 +44,7 @@
|
|||||||
default = pkgs.appimageTools.wrapType1 {
|
default = pkgs.appimageTools.wrapType1 {
|
||||||
inherit name;
|
inherit name;
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
src = appimage;
|
||||||
url = "https://github.com/story-apps/starc/releases/download/v${version}/starc-setup.AppImage";
|
|
||||||
sha256 = "sha256-KLawvuLyqd7aPidH3ghr7mLl9NFQ7nduhnxAq0RpToQ=";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraInstallCommands = ''
|
extraInstallCommands = ''
|
||||||
# Install .desktop file
|
# Install .desktop file
|
||||||
@ -59,5 +61,23 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
apps.${system} = {
|
||||||
|
dev = {
|
||||||
|
program = "${pkgs.writeShellScript "download-appimage" ''
|
||||||
|
${pkgs.curl}/bin/curl ${appimage.url} -Lo ${name}.AppImage
|
||||||
|
''}";
|
||||||
|
type = "app";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.${system} = {
|
||||||
|
default = pkgs.mkShellNoCC {
|
||||||
|
packages = with pkgs; [
|
||||||
|
appimage-run
|
||||||
|
file
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user