mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
added custom package
This commit is contained in:
parent
5513491697
commit
a0dc72ccda
5 changed files with 59 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
||||||
flake.lock
|
|
||||||
hardware-configuration.nix
|
|
||||||
|
|
@ -32,6 +32,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
overlays = [
|
||||||
|
(final: prev: rec {
|
||||||
|
AFKCommands = final.callPackage ./pkgs/AFKCommands {};
|
||||||
|
}
|
||||||
|
)];
|
||||||
};
|
};
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
in {
|
in {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ o.backup = false
|
||||||
o.writebackup = false
|
o.writebackup = false
|
||||||
--formatting
|
--formatting
|
||||||
o.expandtab = true
|
o.expandtab = true
|
||||||
o.shiftwidth = true
|
o.shiftwidth = 2
|
||||||
o.tabstop = 2
|
o.tabstop = 2
|
||||||
-- pretty numbers
|
-- pretty numbers
|
||||||
o.signcolumn = "number"
|
o.signcolumn = "number"
|
||||||
|
|
|
||||||
52
pkgs/AFKCommands/default.nix
Normal file
52
pkgs/AFKCommands/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, writeText
|
||||||
|
, fetchFromGitHub
|
||||||
|
, xorg
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "AFKCommands";
|
||||||
|
version = "1.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "ISnortPennies";
|
||||||
|
repo = "AFKCommands";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "sha256-5K7f/GU15nmzvw65p5Nk4f/8hafl9GNHfmAmpCZctQA=";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
xorg.libXScrnSaver
|
||||||
|
xorg.libX11
|
||||||
|
];
|
||||||
|
|
||||||
|
ConfigText = writeText "config.h" ''
|
||||||
|
const int AFK = 10;
|
||||||
|
const int RESTART = 60;
|
||||||
|
const char* COMMANDS[] = {
|
||||||
|
"echo \"config worked\"",
|
||||||
|
"echo \"sample command 2\"",
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
configurePhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
export C_INCLUDE_PATH=$out
|
||||||
|
cp $ConfigText $out/config.h
|
||||||
|
'';
|
||||||
|
buildPhase = ''
|
||||||
|
gcc AFKCommands.c -o AFKCommands -Wall -Wextra -Werror -lXss -lX11
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
mv AFKCommands $out/bin/AFKCommands
|
||||||
|
'';
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://github.com/ISnortPennies/AFKCommands";
|
||||||
|
description = "A utility that queries the X server for the user's idle time and prints it to stdout";
|
||||||
|
license = licenses.unlicense;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
android-tools
|
android-tools
|
||||||
openjdk
|
openjdk
|
||||||
|
AFKCommands
|
||||||
];
|
];
|
||||||
#user managment
|
#user managment
|
||||||
users = {
|
users = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue