Lints and suggestions for the Nix programming language
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

simplify flake

Akshay 05b11f14 c2f0582d

+14 -9
+1 -1
bin/src/config.rs
··· 11 11 12 12 use crate::err::ConfigErr; 13 13 14 - /// Static analysis and linting for the nix programming language 14 + /// Lints and suggestions for the Nix programming language 15 15 #[derive(Clap, Debug)] 16 16 #[clap(version = "0.1.0", author = "Akshay <nerdy@peppe.rs>")] 17 17 pub struct Opts {
+13 -8
flake.nix
··· 21 21 }: 22 22 let 23 23 inherit (import-cargo.builders) importCargo; 24 + 24 25 supportedSystems = [ "x86_64-linux" ]; 25 26 forAllSystems = nixpkgs.lib.genAttrs supportedSystems; 26 27 nixpkgsFor = forAllSystems (system: ··· 28 29 inherit system; 29 30 overlays = [ self.overlay ]; 30 31 }); 32 + 31 33 mozilla = p: p.callPackage (mozillapkgs + "/package-set.nix") { }; 32 34 chanspec = { 33 35 date = "2021-09-30"; 34 36 channel = "nightly"; 35 37 sha256 = "Elqn7GDBDE/QT1XTDyj0EvivbC//uwjWX8d+J3Pi0dY="; # set zeros after modifying channel or date 36 38 }; 39 + rustChannel = p: (mozilla p).rustChannelOf chanspec; 40 + 37 41 in 38 42 { 39 43 40 44 overlay = final: prev: 41 45 let 42 - rustChannel = (mozilla final.pkgs).rustChannelOf chanspec; 43 - inherit (rustChannel) rust rustc rust-src; 46 + inherit (rustChannel final.pkgs) rust rust-src; 44 47 in 45 48 { 46 49 47 50 statix = with final; pkgs.stdenv.mkDerivation { 48 51 pname = "statix"; 49 52 version = "v0.1.0"; 50 - src = ./.; 53 + src = builtins.path { 54 + path = ./.; 55 + name = "statix"; 56 + }; 51 57 nativeBuildInputs = [ 52 58 (importCargo { lockFile = ./Cargo.lock; inherit pkgs; }).cargoHome 53 59 rust ··· 73 79 devShell = forAllSystems (system: 74 80 let 75 81 pkgs = nixpkgsFor.${system}; 76 - rustChannel = (mozilla pkgs).rustChannelOf chanspec; 82 + inherit (rustChannel pkgs) rust rust-src; 77 83 in 78 84 with pkgs; 79 85 mkShell rec { 80 86 buildInputs = 81 - (with pkgs; [ 87 + [ 82 88 rust-analyzer 83 89 rustfmt 84 90 cargo 85 91 cargo-watch 86 - ]) ++ (with rustChannel; [ 87 92 rust 88 93 rust-src 89 - ]); 90 - RUST_SRC_PATH = "${rustChannel.rust-src}/lib/rustlib/src/rust/library"; 94 + ]; 95 + RUST_SRC_PATH = "${rust-src}/lib/rustlib/src/rust/library"; 91 96 RUST_LOG = "info"; 92 97 RUST_BACKTRACE = 1; 93 98 });