From 642ae9acda2be1f52e97a0b64657acac314c6b3a Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Tue, 28 May 2024 06:08:00 +0300 Subject: [PATCH] build(nix): fix crane deprecated api --- flake.nix | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/flake.nix b/flake.nix index c318584..502a641 100644 --- a/flake.nix +++ b/flake.nix @@ -15,23 +15,10 @@ outputs = { self, nixpkgs, crane, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: let - pkgs = import nixpkgs { - inherit system; - }; - - craneLib = crane.lib.${system}; + pkgs = nixpkgs.legacyPackages.${system}; + craneLib = crane.mkLib pkgs; my-crate = craneLib.buildPackage { src = craneLib.cleanCargoSource (craneLib.path ./.); - - buildInputs = [ - # Add additional build inputs here - ] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [ - # Additional darwin specific inputs can be set here - pkgs.libiconv - ]; - - # Additional environment variables can be set directly - # MY_CUSTOM_VAR = "some value"; }; in { @@ -50,7 +37,6 @@ inputsFrom = builtins.attrValues self.checks.${system}; - # Extra inputs can be added here packages = with pkgs; [ cargo rustc