This commit is contained in:
Michael Zhang 2023-06-12 00:45:53 -05:00
parent dac40537bf
commit dd44079987
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
5 changed files with 183 additions and 5 deletions

6
.envrc
View file

@ -1,4 +1,4 @@
strict_env
export HOUHOU_SRC=$PWD
export DATABASE_URL=$HOUHOU_SRC/src-tauri/SrsDatabase.sqlite
export DATABASE_URL=$HOUHOU_SRC/src-tauri/SrsDatabase.sqlite
use flake

3
.gitignore vendored
View file

@ -24,4 +24,5 @@ dist-ssr
*.sw?
houhou.db
src/data/kanadata.json
src/data/kanadata.json
.direnv

112
flake.lock Normal file
View file

@ -0,0 +1,112 @@
{
"nodes": {
"fenix": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1686464419,
"narHash": "sha256-2hnB1rRENavNQRmroJqRJlAXJxaUxFuNKxWTHtXBUlE=",
"owner": "nix-community",
"repo": "fenix",
"rev": "f7169edb93ce396ff1f0d94620241c6390f49f54",
"type": "github"
},
"original": {
"id": "fenix",
"type": "indirect"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1686412476,
"narHash": "sha256-inl9SVk6o5h75XKC79qrDCAobTD1Jxh6kVYTZKHzewA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "21951114383770f96ae528d0ae68824557768e81",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1686544600,
"narHash": "sha256-QRSZuGex5W+41zqm7NHXcokkgev8WULS8xGyQEpMXtI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c1944ee51b8d6885aaa5470fbb010b86c01d6470",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"fenix": "fenix",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1686406537,
"narHash": "sha256-dLR+WVwKTwmzCVx0N91BkILXhNPlZ3uuUVg6GFvusME=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "68bdf609f37a74547d9fbdf28ed22c10f9bcca45",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"systems": {
"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",
"version": 7
}

62
flake.nix Normal file
View file

@ -0,0 +1,62 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, fenix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ fenix.overlays.default ];
};
toolchain = pkgs.fenix.stable;
libraries = with pkgs; [
webkitgtk
gtk3
cairo
gdk-pixbuf
glib.out
dbus.lib
openssl.out
libayatana-appindicator
];
packages = with pkgs; [
pkg-config
dbus
openssl
glib
gtk3
libsoup
webkitgtk
appimagekit
];
in {
devShell = pkgs.mkShell {
buildInputs = packages;
packages = (with pkgs; [ ]) ++ (with toolchain; [
rustc
cargo
# rust-analyzer
# rust-src
# rust-std
# Get the nightly version of rustfmt so we can wrap comments
pkgs.fenix.default.rustfmt
]);
shellHook = let
joinLibs = libs:
builtins.concatStringsSep ":" (builtins.map (x: "${x}/lib") libs);
libs = joinLibs libraries;
in ''
export LD_LIBRARY_PATH=${libs}:$LD_LIBRARY_PATH
'';
};
});
}

View file

@ -31,6 +31,9 @@
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
],
"resources": [
"./KanjiDatabase.sqlite"
]
},
"security": {
@ -50,4 +53,4 @@
}
]
}
}
}