Skip to content

Commit

Permalink
Change flake.nix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
doronbehar committed Mar 4, 2021
1 parent 2665155 commit ef61f85
Showing 1 changed file with 32 additions and 26 deletions.
58 changes: 32 additions & 26 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,36 @@
flake = false;
};

outputs = { self, nixpkgs, flake-utils, flake-compat }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
pistol = pkgs.pistol.overrideAttrs(oldAttrs: rec {
version = "${builtins.readFile ./VERSION}-flake";
buildFlagsArray = [
"-ldflags=-s -w -X main.Version=${version}"
];
});
in rec {
devShell = pkgs.mkShell {
buildInputs = pistol.buildInputs ++ [
pkgs.elinks
];
};
packages.pistol = pistol;
defaultPackage = pistol;
apps.pistol = {
type = "app";
program = "${pistol}/bin/pistol";
};
defaultApp = apps.pistol;
}
);
outputs = { self
, nixpkgs
, flake-utils
, flake-compat
}:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
pistol = pkgs.pistol.overrideAttrs(oldAttrs: rec {
version = "${builtins.readFile ./VERSION}-flake";
src = builtins.filterSource
(path: type: type != "directory" || baseNameOf path != ".git")
./.;
buildFlagsArray = [
"-ldflags=-s -w -X main.Version=${version}"
];
});
in rec {
devShell = pkgs.mkShell {
buildInputs = pistol.buildInputs ++ [
pkgs.elinks
];
};
packages.pistol = pistol;
defaultPackage = pistol;
apps.pistol = {
type = "app";
program = "${pistol}/bin/pistol";
};
defaultApp = apps.pistol;
}
);
}

0 comments on commit ef61f85

Please sign in to comment.