Add basic Nix flake.

This commit is contained in:
Brenden Matthews
2023-01-01 13:39:34 -05:00
committed by Brenden Matthews
parent 3f43ff1aa8
commit 5fb9dfe10e
3 changed files with 105 additions and 0 deletions

2
.gitignore vendored
View File

@@ -28,3 +28,5 @@ lua/libimlib2.c
*.code-workspace
.idea/
# Ignore nix stuff
/result

43
flake.lock generated Normal file
View File

@@ -0,0 +1,43 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1672350804,
"narHash": "sha256-jo6zkiCabUBn3ObuKXHGqqORUMH27gYDIFFfLq5P4wg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "677ed08a50931e38382dbef01cba08a8f7eac8f6",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

60
flake.nix Normal file
View File

@@ -0,0 +1,60 @@
{
description = "A Nix flake for Conky";
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlay ];
};
in
rec
{
packages = flake-utils.lib.flattenTree {
conky = pkgs.conky;
};
defaultPackage = packages.conky;
apps.conky = flake-utils.lib.mkApp { drv = packages.conky; };
defaultApp = apps.conky;
}
) // {
overlay = final: prev: {
conky = with final; stdenv.mkDerivation rec {
name = "conky";
src = ./.;
nativeBuildInputs = [
clang_14
cmake
git
ninja
pkg-config
];
buildInputs = [
freetype
gettext
imlib2
llvmPackages_14.libcxx
llvmPackages_14.libcxxabi
lua
ncurses
xorg.libICE
xorg.libSM
xorg.libX11
xorg.libXext
xorg.libXft
xorg.libXinerama
];
};
};
};
}