dwmblocks derivation

This commit is contained in:
Sam 2024-06-13 17:44:06 +01:00
parent 326d8fbae7
commit 18448d340a
2 changed files with 34 additions and 15 deletions

View File

@ -0,0 +1,33 @@
{ pkgs ? import <nixpkgs> { }
, fetchFromGitea ? pkgs.fetchFromGitea
#, stdenv ? pkgs.stdenv
#, pkg-config ? pkgs.pkg-config
#, fontconfig ? pkgs.fontconfig
#, freetype ? pkgs.freetype
#, libX11 ? pkgs.xorg.libX11
#, libXft ? pkgs.xorg.libXft
#, ncurses ? pkgs.ncurses
#, extraLibs ? [ ]
}:
pkgs.stdenv.mkDerivation {
pname = "dwmblocks";
name = "dwmblocks";
src = fetchFromGitea {
domain = "git.bitlab21.com";
owner = "sam";
repo = "dwmblocks";
rev = "c4e7a9b1eb98123e239ba76bc551934721fd18ca";
sha256 = "sha256-4W9w/Efk+YCSP1VuUFr+jPXIyrlpktwxRPUOZHTAtx8=";
};
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out/usr/local/bin
mv st $out/usr/local/bin
'';
}

View File

@ -1,13 +1,8 @@
{ pkgs ? import <nixpkgs> { } { pkgs ? import <nixpkgs> { }
, fetchFromGitea ? pkgs.fetchFromGitea , fetchFromGitea ? pkgs.fetchFromGitea
, stdenv ? pkgs.stdenv
, pkg-config ? pkgs.pkg-config , pkg-config ? pkgs.pkg-config
, fontconfig ? pkgs.fontconfig
, freetype ? pkgs.freetype
, libX11 ? pkgs.xorg.libX11 , libX11 ? pkgs.xorg.libX11
, libXft ? pkgs.xorg.libXft , libXft ? pkgs.xorg.libXft
, ncurses ? pkgs.ncurses
, extraLibs ? [ ]
}: }:
pkgs.stdenv.mkDerivation { pkgs.stdenv.mkDerivation {
pname = "st"; pname = "st";
@ -21,23 +16,14 @@ pkgs.stdenv.mkDerivation {
sha256 = "sha256-4W9w/Efk+YCSP1VuUFr+jPXIyrlpktwxRPUOZHTAtx8="; sha256 = "sha256-4W9w/Efk+YCSP1VuUFr+jPXIyrlpktwxRPUOZHTAtx8=";
}; };
makeFlags = [
"PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config"
];
nativeBuildInputs = [ nativeBuildInputs = [
pkg-config pkg-config
ncurses
fontconfig
freetype
]; ];
buildInputs = [ buildInputs = [
libX11 libX11
libXft libXft
] ++ extraLibs; ];
installFlags = [ "PREFIX=$(out)" ];
buildPhase = '' buildPhase = ''
make make