Compare commits

..

No commits in common. "42d12b68886ae8559fe4299f129f9eba9eefa508" and "ec75d13175b3697c20816c74b22bf5141475f2cf" have entirely different histories.

3 changed files with 11 additions and 127 deletions

1
.gitignore vendored
View file

@ -1,4 +1,3 @@
/target /target
.direnv .direnv
dist dist
result

102
flake.lock generated
View file

@ -1,66 +1,9 @@
{ {
"nodes": { "nodes": {
"crane": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1692750383,
"narHash": "sha256-n5P5HOXuu23UB1h9PuayldnRRVQuXJLpoO+xqtMO3ws=",
"owner": "ipetkov",
"repo": "crane",
"rev": "ef5d11e3c2e5b3924eb0309dba2e1fea2d9062ae",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
}, },
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
@ -109,39 +52,13 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"crane": "crane",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay"
} }
}, },
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": "flake-utils",
"crane",
"flake-utils"
],
"nixpkgs": [
"crane",
"nixpkgs"
]
},
"locked": {
"lastModified": 1691374719,
"narHash": "sha256-HCodqnx1Mi2vN4f3hjRPc7+lSQy18vRn8xWW68GeQOg=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "b520a3889b24aaf909e287d19d406862ced9ffc9",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
@ -172,21 +89,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -17,13 +17,9 @@ Updating `cargoHash`:
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.url = "github:oxalica/rust-overlay";
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = { self, nixpkgs, rust-overlay, crane }: outputs = { self, nixpkgs, rust-overlay }:
let let
overlays = [ (import rust-overlay) ]; overlays = [ (import rust-overlay) ];
system = "x86_64-linux"; system = "x86_64-linux";
@ -74,29 +70,16 @@ Updating `cargoHash`:
description = "A tool for generating dye sublimation transfer sheet SVGs for Japanese thumb shift keycaps."; description = "A tool for generating dye sublimation transfer sheet SVGs for Japanese thumb shift keycaps.";
}; };
}); });
dyesub-tool = let dyesub-tool = rustPlatformWasm.buildRustPackage (rustSettings // {
rustToolchain = pkgs.rust-bin.nightly.latest.minimal.override { pname = "dyesub-tool";
targets = [ "wasm32-unknown-unknown" ]; version = "0.1.0";
}; buildAndTestSubdir = "dyesub-tool";
craneLib = ((crane.mkLib pkgs).overrideToolchain rustToolchain).overrideScope' (final: prev: { buildInputs = with pkgs; [ trunk ];
wasm-bindgen-cli = pkgs.wasm-bindgen-cli; cargoHash = "sha256-KSBTEBHuWaenIVaKUMDRFToYxcTA/TFwsIG10WNP47g=";
});
crateNameFromCargoToml = packageName: craneLib.crateNameFromCargoToml { cargoToml = ./${packageName}/Cargo.toml; };
in craneLib.buildTrunkPackage {
inherit (crateNameFromCargoToml "dyesub-tool") pname version;
src = with pkgs.lib; cleanSourceWith {
src = ./.;
filter = path: type:
(hasSuffix "\.html" path) ||
(hasSuffix "\.css" path) ||
(craneLib.filterCargoSources path type)
;
};
trunkIndexPath = "dyesub-tool/index.html";
meta = meta // { meta = meta // {
description = "A tool for generating dye sublimation transfer sheet SVGs for Japanese thumb shift keycaps."; description = "A tool for generating dye sublimation transfer sheet SVGs for Japanese thumb shift keycaps.";
}; };
}; });
}; };
}; };
} }