diff options
| author | Fuwn <[email protected]> | 2024-08-29 18:20:55 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-08-29 18:20:55 -0700 |
| commit | b30b399e9defdd08852f842c0f7fc60cdb0b0595 (patch) | |
| tree | 80f1d80b5f3795dd69180552e5328076eb023d04 /flake.nix | |
| parent | feat(manga): add ciao (diff) | |
| download | locus-b30b399e9defdd08852f842c0f7fc60cdb0b0595.tar.xz locus-b30b399e9defdd08852f842c0f7fc60cdb0b0595.zip | |
ci(nix): fix flake
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 52 |
1 files changed, 21 insertions, 31 deletions
@@ -1,45 +1,35 @@ { inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - nixpkgs-mozilla = { - url = "github:mozilla/nixpkgs-mozilla"; - flake = false; - }; flake-utils.url = "github:numtide/flake-utils"; - gitignore = { - url = "github:hercules-ci/gitignore.nix"; + + rust-overlay = { + url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; - naersk.url = "github:nix-community/naersk"; }; - outputs = { self, nixpkgs, nixpkgs-mozilla, flake-utils, gitignore, naersk, ... }: - flake-utils.lib.eachDefaultSystem (system: + outputs = + { + self, + nixpkgs, + flake-utils, + rust-overlay, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: let - pkgs = (import nixpkgs) { - inherit system; - overlays = [ - (import nixpkgs-mozilla) - ]; - }; - toolchain = (pkgs.rustChannelOf { - rustToolchain = ./rust-toolchain.toml; - sha256 = "sha256-pxvOVg97Rgb8MqUMl/c0bnMTmHGSkx/+snWXVgjzwMI="; - }).rust; - naersk' = pkgs.callPackage naersk { - cargo = toolchain; - rustc = toolchain; - }; - inherit (gitignore.lib) gitignoreSource; + overlays = [ (import rust-overlay) ]; + pkgs = import nixpkgs { inherit system overlays; }; in rec { - packages.default = naersk'.buildPackage { - src = gitignoreSource ./.; - }; devShell = pkgs.mkShell { - shellHook = '' - export LD_LIBRARY_PATH=${pkgs.openssl.out}/lib - ''; - nativeBuildInputs = with pkgs; [ toolchain cargo-make openssl ]; + nativeBuildInputs = with pkgs; [ + rust-bin.nightly."2024-07-17".default + cargo-make + openssl.dev + pkg-config + ]; }; } ); |