Skip to content

Instantly share code, notes, and snippets.

@kotatsuyaki
Created March 27, 2022 06:42
Show Gist options
  • Save kotatsuyaki/c0ab53828b9239431c9df61043c35895 to your computer and use it in GitHub Desktop.
Save kotatsuyaki/c0ab53828b9239431c9df61043c35895 to your computer and use it in GitHub Desktop.
Nix flake for devshell with chkservice (https://github.com/linuxenko/chkservice)
{
description = "chkservice devshell";
outputs = { self, nixpkgs }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
chkservice = pkgs.stdenv.mkDerivation {
name = "chkservice";
src = pkgs.fetchFromGitHub {
owner = "linuxenko";
repo = "chkservice";
rev = "0.3";
sha256 = "sha256-ZllO6Ag+OgAkQp6jSv000NUEskXFuhMcCo83A4Wp2zU=";
};
buildInputs = with pkgs; [
pkg-config
systemd
ncurses
];
nativeBuildInputs = with pkgs; [
cmake
extra-cmake-modules
];
};
in {
packages.x86_64-linux.hello = pkgs.hello;
defaultPackage.x86_64-linux = self.packages.x86_64-linux.hello;
devShell.x86_64-linux = pkgs.mkShell {
buildInputs = with pkgs; [ chkservice rnix-lsp ];
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment