smallwm: refactor
- finalAttrs - strictDeps - decoration hooks - meta.mainProgram
This commit is contained in:
parent
457b19c610
commit
c40824291a
@ -1,38 +1,60 @@
|
||||
{ lib, stdenv, fetchFromGitHub
|
||||
, doxygen, graphviz, libX11, libXrandr }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, doxygen
|
||||
, graphviz
|
||||
, libX11
|
||||
, libXrandr
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "smallwm";
|
||||
version = "2020-02-28";
|
||||
version = "unstable-2020-02-28";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "adamnew123456";
|
||||
repo = "SmallWM";
|
||||
rev = "c2dc72afa87241bcf7e646630f4aae216ce78613";
|
||||
sha256 = "0cqhy81ymdcdyvgi55a401rr96h2akskcxi9ddzjbln4a71yjlz8";
|
||||
hash = "sha256-6FPpw1HE0iV/ayl2NvVUApqUcwBElRLf9o216gPyEDM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ doxygen graphviz ];
|
||||
buildInputs = [ libX11 libXrandr ];
|
||||
nativeBuildInputs = [
|
||||
doxygen
|
||||
graphviz
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libX11
|
||||
libXrandr
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
makeFlags = [ "CC=${stdenv.cc}/bin/cc" "CXX=${stdenv.cc}/bin/c++" ];
|
||||
makeFlags = [
|
||||
"CC=${stdenv.cc.targetPrefix}cc"
|
||||
"CXX=${stdenv.cc.targetPrefix}c++"
|
||||
];
|
||||
|
||||
buildFlags = [ "all" "doc" ];
|
||||
|
||||
installPhase = ''
|
||||
install -dm755 $out/bin $out/share/doc/${pname}-${version}
|
||||
runHook preInstall
|
||||
|
||||
install -dm755 $out/bin $out/share/doc/smallwm-${finalAttrs.version}
|
||||
install -m755 bin/smallwm -t $out/bin
|
||||
cp -r README.markdown doc/html doc/latex $out/share/doc/${pname}-${version}
|
||||
cp -r README.markdown doc/html doc/latex $out/share/doc/smallwm-${finalAttrs.version}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib;{
|
||||
meta = {
|
||||
description = "A small X window manager, extended from tinywm";
|
||||
homepage = "https://github.com/adamnew123456/SmallWM";
|
||||
license = licenses.bsd2;
|
||||
maintainers = [ maintainers.AndersonTorres ];
|
||||
platforms = platforms.linux;
|
||||
license = lib.licenses.bsd2;
|
||||
mainProgram = "smallwm";
|
||||
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||
inherit (libX11.meta) platforms;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user