Want to contribute? Fork me on Codeberg.org!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.8 KiB

11 months ago
/*
Some utility commands:
- `nix flake update --commit-lock-file`
- `nix flake lock update-input <input>`
11 months ago
- `nix build .#dyesub-tool`
- `nix run .#dyesub-tool`
11 months ago
Updating `cargoHash`:
- Set `cargoHash` to an empty string
11 months ago
- run `nix run .#dyesub-tool`
11 months ago
- Update `cargoHash` with correct hash from output
*/
{
11 months ago
description = "A tool for generating dye sublimation transfer sheet SVGs for Japanese thumb shift keycaps.";
11 months ago
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; {
11 months ago
license = [ licenses.gpl3 ];
11 months ago
platforms = [ system ];
11 months ago
maintainers = with maintainers; [ elnudev ];
11 months ago
};
in {
devShells.${system}.default = with pkgs; mkShell {
packages = [
(pkgs.rust-bin.stable.latest.default.override {
extensions = [ "rust-src" ];
})
bacon
];
11 months ago
inputsFrom = with self.packages.${system}; [ dyesub-tool ];
11 months ago
};
packages.${system} = {
11 months ago
default = self.packages.${system}.dyesub-tool;
dyesub-tool = pkgs.rustPlatform.buildRustPackage (rustSettings // {
pname = "dyesub-tool";
11 months ago
version = "0.1.0";
11 months ago
buildAndTestSubdir = "dyesub-tool";
cargoHash = "sha256-QlLyKDZZ+/bB4xBv0j9GoL6Ur3Okdskkazi4WlHhx6Y=";
11 months ago
meta = meta // {
11 months ago
description = "A tool for generating dye sublimation transfer sheet SVGs for Japanese thumb shift keycaps.";
11 months ago
};
});
};
};
}