-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathflake.nix
45 lines (36 loc) · 1.08 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
outputs = {
self,
nixpkgs,
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
hardeningDisable = ["format" "fortify"];
in {
devShells.${system}.default = pkgs.mkShell {
inherit hardeningDisable;
inputsFrom = [self.packages.${system}.cano];
packages = with pkgs; [gcc bear valgrind];
env.HELP_DIR = "docs/help";
};
formatter.${system} = pkgs.alejandra;
packages.${system} = {
default = self.packages.${system}.cano;
cano = pkgs.stdenv.mkDerivation {
inherit hardeningDisable;
name = "cano";
src = ./.;
buildInputs = [pkgs.ncurses];
makeFlags = "PREFIX=${placeholder "out"}";
meta = {
description = "Text Editor Written In C Using ncurses";
license = pkgs.lib.licenses.asl20;
maintainers = with pkgs.lib.maintainers; [ sigmanificient ];
platforms = pkgs.lib.platforms.linux;
mainProgram = "cano";
};
};
};
};
}