|
|
|
/*
|
|
|
|
Some utility commands:
|
|
|
|
- `nix flake update --commit-lock-file`
|
|
|
|
- `nix flake lock update-input <input>`
|
|
|
|
- `nix build .#dyesub-tool`
|
|
|
|
- `nix run .#dyesub-tool`
|
|
|
|
|
|
|
|
Updating `cargoHash`:
|
|
|
|
- Set `cargoHash` to an empty string
|
|
|
|
- run `nix run .#dyesub-tool`
|
|
|
|
- Update `cargoHash` with correct hash from output
|
|
|
|
*/
|
|
|
|
|
|
|
|
{
|
|
|
|
description = "A tool for generating dye sublimation transfer sheet SVGs for Japanese thumb shift 拇指シフト keycaps.";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, rust-overlay }:
|
|
|
|
let
|
|
|
|
overlays = [ (import rust-overlay) ];
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system overlays;
|
|
|
|
};
|
|
|
|
rustSettings = with pkgs; {
|
|
|
|
src = ./.;
|
|
|
|
cargoHash = nixpkgs.lib.fakeHash;
|
|
|
|
};
|
|
|
|
meta = with nixpkgs.lib; {
|
|
|
|
license = [ licenses.gpl3 ];
|
|
|
|
platforms = [ system ];
|
|
|
|
maintainers = with maintainers; [ elnudev ];
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
devShells.${system}.default = with pkgs; mkShell {
|
|
|
|
packages = [
|
|
|
|
# nightly is required for function signal syntax in leptos
|
|
|
|
# https://leptos-rs.github.io/leptos/02_getting_started.html
|
|
|
|
(pkgs.rust-bin.nightly.latest.default.override {
|
|
|
|
targets = [ "wasm32-unknown-unknown" ];
|
|
|
|
extensions = [ "rust-src" ];
|
|
|
|
})
|
|
|
|
bacon
|
|
|
|
];
|
|
|
|
inputsFrom = with self.packages.${system}; [ dyesub-tool ];
|
|
|
|
};
|
|
|
|
packages.${system} = {
|
|
|
|
default = self.packages.${system}.dyesub-tool;
|
|
|
|
dyesub-tool = pkgs.rustPlatform.buildRustPackage (rustSettings // {
|
|
|
|
pname = "dyesub-tool";
|
|
|
|
version = "0.1.0";
|
|
|
|
buildAndTestSubdir = "dyesub-tool";
|
|
|
|
buildInputs = with pkgs; [ trunk ];
|
|
|
|
cargoHash = "sha256-UcFVv4lqmZW4Nwjps2u2cNU323hk8ezifeGU9dEZ7Ao=";
|
|
|
|
meta = meta // {
|
|
|
|
description = "A tool for generating dye sublimation transfer sheet SVGs for Japanese thumb shift 拇指シフト keycaps.";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|