-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
45 lines (43 loc) · 1.48 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
description = "Anki's alternative for who hates GUI and mouse clicks";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
rustVersion = pkgs.rust-bin.stable.latest.default;
mem-yaml = with pkgs; rustPlatform.buildRustPackage rec {
pname = "mem-yaml";
version = "0.1.0-alpha";
src = pkgs.fetchCrate {
inherit pname version;
hash = "sha256-anSf640Ir4yKnsWRZlnTdJhssgm9EbZ8ayQPdtBemOs=";
};
cargoHash = "sha256-ikBJUqGmfDheKnxCNrg17pzgUolJLSQaLDXPfwu5zl0=";
meta = with lib; {
description = "Anki's alternative for who hates GUI and mouse clicks";
license = licenses.mit;
platforms = platforms.all;
homepage = "https://github.com/haruki-nikaidou/mem-yaml.git";
};
};
mem-yaml-exe = flake-utils.lib.mkApp {
drv = mem-yaml;
exePath = "/bin/mem-yaml";
};
in
{
packages.mem-yaml = mem-yaml;
packages.default = mem-yaml;
apps.mem-yaml = mem-yaml-exe;
apps.default = mem-yaml-exe;
}
);
}