2022-12-31 17:07:58 +00:00
|
|
|
{
|
|
|
|
description = "Lumenescent Dreams Tools";
|
|
|
|
|
|
|
|
inputs = {
|
2023-02-11 17:59:15 +00:00
|
|
|
nixpkgs.url = "nixpkgs/nixos-22.11";
|
|
|
|
unstable.url = "nixpkgs/nixos-unstable";
|
2023-04-02 18:19:49 +00:00
|
|
|
pkgs-cargo2nix.url = "github:cargo2nix/cargo2nix";
|
2023-04-26 22:19:49 +00:00
|
|
|
typeshare.url = "github:savannidgerinel/typeshare/savannidgerinel/add-a-nix-flake";
|
2023-05-07 15:01:09 +00:00
|
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
2022-12-31 17:07:58 +00:00
|
|
|
};
|
|
|
|
|
2023-05-07 15:01:09 +00:00
|
|
|
outputs = { self, nixpkgs, unstable, pkgs-cargo2nix, typeshare, rust-overlay, ... }:
|
2022-12-31 17:07:58 +00:00
|
|
|
let
|
|
|
|
version = builtins.string 0 8 self.lastModifiedDate;
|
|
|
|
supportedSystems = [ "x86_64-linux" ];
|
|
|
|
in
|
|
|
|
{
|
|
|
|
devShell."x86_64-linux" =
|
|
|
|
let
|
2023-03-31 02:52:59 +00:00
|
|
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
|
|
|
pkgs-unstable = import unstable { system = "x86_64-linux"; };
|
2023-04-02 18:19:49 +00:00
|
|
|
cargo2nix = pkgs-cargo2nix.packages."x86_64-linux";
|
2022-12-31 17:07:58 +00:00
|
|
|
in
|
|
|
|
pkgs.mkShell {
|
|
|
|
name = "ld-tools-devshell";
|
|
|
|
buildInputs = [
|
2023-02-11 17:59:15 +00:00
|
|
|
pkgs.clang
|
|
|
|
pkgs.entr
|
2023-02-06 14:36:02 +00:00
|
|
|
pkgs.glade
|
2023-02-11 17:59:15 +00:00
|
|
|
pkgs.glib
|
|
|
|
pkgs.gst_all_1.gst-plugins-bad
|
|
|
|
pkgs.gst_all_1.gst-plugins-base
|
|
|
|
pkgs.gst_all_1.gst-plugins-good
|
|
|
|
pkgs.gst_all_1.gst-plugins-ugly
|
|
|
|
pkgs.gst_all_1.gstreamer
|
2023-02-06 14:36:02 +00:00
|
|
|
pkgs.gtk4
|
2023-02-11 17:59:15 +00:00
|
|
|
pkgs.nodejs
|
2022-12-31 17:07:58 +00:00
|
|
|
pkgs.openssl
|
2023-02-11 17:59:15 +00:00
|
|
|
pkgs.pipewire
|
2023-02-06 14:36:02 +00:00
|
|
|
pkgs.pkg-config
|
2023-02-11 17:59:15 +00:00
|
|
|
pkgs.sqlite
|
2023-03-31 02:52:59 +00:00
|
|
|
pkgs.rustup
|
2023-04-02 19:48:12 +00:00
|
|
|
pkgs.crate2nix
|
2023-04-20 13:40:59 +00:00
|
|
|
pkgs.wasm-pack
|
2023-05-07 15:01:09 +00:00
|
|
|
pkgs.node2nix
|
|
|
|
pkgs.wasm-bindgen-cli
|
2023-04-21 13:25:21 +00:00
|
|
|
pkgs-unstable.typeshare
|
2022-12-31 17:07:58 +00:00
|
|
|
];
|
2023-02-11 17:59:15 +00:00
|
|
|
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
|
2022-12-31 17:07:58 +00:00
|
|
|
};
|
2023-04-02 19:48:12 +00:00
|
|
|
packages."x86_64-linux" =
|
|
|
|
let
|
2023-05-07 15:01:09 +00:00
|
|
|
pkgs = import nixpkgs {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
overlays = [ (import rust-overlay) ];
|
|
|
|
};
|
2023-04-02 19:48:12 +00:00
|
|
|
standardOverride = attrs: {
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkgs.pkg-config
|
|
|
|
pkgs.gtk4
|
|
|
|
];
|
2023-04-26 22:19:49 +00:00
|
|
|
buildInputs = [
|
|
|
|
typeshare.packages."x86_64-linux".default
|
|
|
|
];
|
2023-04-02 19:48:12 +00:00
|
|
|
verbose = true;
|
|
|
|
};
|
2023-05-07 15:01:09 +00:00
|
|
|
|
|
|
|
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain;
|
2023-04-02 19:48:12 +00:00
|
|
|
in {
|
2023-05-07 15:01:09 +00:00
|
|
|
kifu-gtk = import ./kifu/kifu-gtk {
|
|
|
|
inherit pkgs;
|
|
|
|
typeshare = typeshare.packages."x86_64-linux".default;
|
|
|
|
};
|
2023-04-26 22:19:49 +00:00
|
|
|
|
2023-05-07 15:01:09 +00:00
|
|
|
kifu-wasm = import ./kifu/kifu-wasm {
|
2023-04-02 19:48:12 +00:00
|
|
|
inherit pkgs;
|
2023-05-07 15:01:09 +00:00
|
|
|
typeshare = typeshare.packages."x86_64-linux".default;
|
|
|
|
wasm-pack = pkgs.wasm-pack;
|
|
|
|
rustc = rust.availableComponents.rustc;
|
|
|
|
};
|
|
|
|
|
|
|
|
kifu-pwa = let
|
|
|
|
deps = (import ./kifu/kifu-pwa { inherit pkgs; }).nodeDependencies;
|
|
|
|
in pkgs.stdenv.mkDerivation {
|
|
|
|
name = "kifu-pwa";
|
|
|
|
src = ./kifu/kifu-pwa;
|
2023-04-26 22:19:49 +00:00
|
|
|
|
2023-05-07 15:01:09 +00:00
|
|
|
buildInputs = [ pkgs.nodejs pkgs.nodePackages.webpack-cli ];
|
|
|
|
buildPhase = ''
|
|
|
|
ln -s ${deps}/lib/node_modules ./node_modules
|
|
|
|
export PATH="${deps}/bin:$PATH"
|
|
|
|
webpack
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
cp -r dist $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
cyberpunk-splash = import ./cyberpunk-splash {
|
2023-04-13 23:13:02 +00:00
|
|
|
inherit pkgs;
|
2023-05-07 15:01:09 +00:00
|
|
|
typeshare = typeshare.packages."x86_64-linux".default;
|
|
|
|
};
|
2023-04-02 19:48:12 +00:00
|
|
|
};
|
2022-12-31 17:07:58 +00:00
|
|
|
};
|
|
|
|
}
|