Something went wrong. Try again.
My personal-knowledge-system, with deeply integrated task tracking and long term goal planning capabilities.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147{ description = "Filaments Flake";
# Flake inputs inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; # unstable Nixpkgs
fenix = { url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs"; };
crane.url = "github:ipetkov/crane"; };
# Flake outputs outputs = { self, ... }@inputs:
let supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: inputs.nixpkgs.lib.genAttrs supportedSystems ( system: f { pkgs = import inputs.nixpkgs { inherit system; overlays = [ inputs.self.overlays.default ]; }; } );
in {
overlays.default = final: prev: { # Need this specific `sea-orm-cli` sea-orm-cli = final.rustPlatform.buildRustPackage rec { pname = "sea-orm-cli"; version = "2.0.0-rc.37";
src = final.fetchCrate { inherit pname version; sha256 = "sha256-YbP85rVO41S7ZPWSpVz3jICLAEU8H/a2axJBtdFRuWY=";
};
cargoHash = "sha256-6lOXyaNxrIfCI3T9nIPR76rhQXvRzSVQUsPRjo5abmI="; nativeBuildInputs = [ final.pkg-config ];
buildInputs = [ final.openssl ];
doCheck = true; };
rustToolchain = with inputs.fenix.packages.${prev.stdenv.hostPlatform.system}; combine ( with stable; [ clippy rustc cargo rustfmt rust-src ] ); };
packages = forEachSupportedSystem ( { pkgs }: let craneLib = inputs.crane.mkLib pkgs;
src = pkgs.lib.cleanSourceWith { src = ./.; filter = path: type: (pkgs.lib.hasSuffix ".ron" path) || (craneLib.filterCargoSources path type); };
commonArgs = { inherit src; strictDeps = true; nativeBuildInputs = [ pkgs.pkg-config ]; buildInputs = [ pkgs.openssl ]; };
cargoArtifacts = craneLib.buildDepsOnly commonArgs; in { default = craneLib.buildPackage ( commonArgs // { inherit cargoArtifacts; } ); } );
# Needed developer tools. devShells = forEachSupportedSystem ( { pkgs }: { default = pkgs.mkShellNoCC {
packages = with pkgs; [
rustToolchain openssl pkg-config cargo-deny cargo-edit cargo-nextest rust-analyzer sea-orm-cli bacon ];
env = { # needed for rust-analyzer RUST_SRC_PATH = "${pkgs.rustToolchain}/lib/rustlib/src/rust/library";
FIL_LOG_LEVEL = "DEBUG"; };
# Need to do this like this because these have to be set at runtime shellHook = '' export FIL_CONFIG="$(pwd)/.config" export FIL_DATA="$(pwd)/.data" ''; }; } ); };}