From 3cf7515ceb6da18dfa72b03aa8981e362c6b5067 Mon Sep 17 00:00:00 2001 From: Cole Mickens Date: Mon, 3 Jun 2019 12:50:20 -0700 Subject: updates; add alacritty --- pkgs-temp/spdlog/default.nix | 47 -------------------- pkgs-temp/wlroots-0.6.0/default.nix | 83 ++++++++++++++++++++++++++++++++++++ pkgs-temp/wlroots-0.6.0/metadata.nix | 5 +++ 3 files changed, 88 insertions(+), 47 deletions(-) delete mode 100644 pkgs-temp/spdlog/default.nix create mode 100644 pkgs-temp/wlroots-0.6.0/default.nix create mode 100644 pkgs-temp/wlroots-0.6.0/metadata.nix (limited to 'pkgs-temp') diff --git a/pkgs-temp/spdlog/default.nix b/pkgs-temp/spdlog/default.nix deleted file mode 100644 index 5dd1228..0000000 --- a/pkgs-temp/spdlog/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{gcc8Stdenv, stdenv, fetchFromGitHub, cmake, gbenchmark }: - -let - generic = { version, sha256 }: - gcc8Stdenv.mkDerivation { - name = "spdlog-${version}"; - inherit version; - - src = fetchFromGitHub { - owner = "gabime"; - repo = "spdlog"; - rev = "v${version}"; - inherit sha256; - }; - - nativeBuildInputs = [ cmake ]; - buildInputs = [ gbenchmark ]; - - cmakeFlags = [ "-DSPDLOG_BUILD_EXAMPLES=OFF" ]; - - outputs = [ "out" "doc" ]; - - postInstall = '' - mkdir -p $out/share/doc/spdlog - cp -rv ../example $out/share/doc/spdlog - ''; - - meta = with stdenv.lib; { - description = "Very fast, header only, C++ logging library."; - homepage = https://github.com/gabime/spdlog; - license = licenses.mit; - maintainers = with maintainers; [ obadz ]; - platforms = platforms.all; - }; - }; -in -{ - spdlog_1 = generic { - version = "1.3.1"; - sha256 = "1rd4zmrlkcdjx0m0wpmjm1g9srj7jak6ai08qkhbn2lsn0niifzd"; - }; - - spdlog_0 = generic { - version = "0.17.0"; - sha256 = "112kfh4fbpm5cvrmgbgz4d8s802db91mhyjpg7cwhlywffnzkwr9"; - }; -} diff --git a/pkgs-temp/wlroots-0.6.0/default.nix b/pkgs-temp/wlroots-0.6.0/default.nix new file mode 100644 index 0000000..ce2039d --- /dev/null +++ b/pkgs-temp/wlroots-0.6.0/default.nix @@ -0,0 +1,83 @@ +{ stdenv, fetchFromGitHub, fetchpatch, meson, ninja, pkgconfig +, wayland, libGL, wayland-protocols, libinput, libxkbcommon, pixman +, xcbutilwm, libX11, libcap, xcbutilimage, xcbutilerrors, mesa_noglu +, libpng, ffmpeg_4 +}: + +let + pname = "wlroots"; + version = "0.6.0"; +in stdenv.mkDerivation rec { + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "swaywm"; + repo = "wlroots"; + rev = version; + sha256 = "1rdcmll5b8w242n6yfjpsaprq280ck2jmbz46dxndhignxgda7k4"; + }; + + # $out for the library, $bin for rootston, and $examples for the example + # programs (in examples) AND rootston + outputs = [ "out" "bin" "examples" ]; + + nativeBuildInputs = [ meson ninja pkgconfig ]; + + buildInputs = [ + wayland libGL wayland-protocols libinput libxkbcommon pixman + xcbutilwm libX11 libcap xcbutilimage xcbutilerrors mesa_noglu + libpng ffmpeg_4 + ]; + + mesonFlags = [ + "-Dlibcap=enabled" "-Dlogind=enabled" "-Dxwayland=enabled" "-Dx11-backend=enabled" + "-Dxcb-icccm=enabled" "-Dxcb-errors=enabled" + ]; + + postPatch = '' + # It happens from time to time that the version wasn't updated: + sed -iE "s/version: '[0-9]\.[0-9]\.[0-9]'/version: '${version}.0'/" meson.build + ''; + + postInstall = '' + # Copy the library to $bin and $examples + for output in "$bin" "$examples"; do + mkdir -p $output/lib + cp -P libwlroots* $output/lib/ + done + ''; + + postFixup = '' + # Install rootston (the reference compositor) to $bin and $examples (this + # has to be done after the fixup phase to prevent broken binaries): + for output in "$bin" "$examples"; do + mkdir -p $output/bin + cp rootston/rootston $output/bin/ + patchelf \ + --set-rpath "$(patchelf --print-rpath $output/bin/rootston | sed s,$out,$output,g)" \ + $output/bin/rootston + mkdir $output/etc + cp ../rootston/rootston.ini.example $output/etc/rootston.ini + done + # Install ALL example programs to $examples: + # screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle + # screenshot output-layout multi-pointer rotation tablet touch pointer + # simple + mkdir -p $examples/bin + cd ./examples + for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do + cp "$binary" "$examples/bin/wlroots-$binary" + patchelf \ + --set-rpath "$(patchelf --print-rpath $output/bin/rootston | sed s,$out,$examples,g)" \ + "$examples/bin/wlroots-$binary" + done + ''; + + meta = with stdenv.lib; { + description = "A modular Wayland compositor library"; + inherit (src.meta) homepage; + license = licenses.mit; + platforms = platforms.linux; + maintainers = with maintainers; [ primeos ]; + }; +} diff --git a/pkgs-temp/wlroots-0.6.0/metadata.nix b/pkgs-temp/wlroots-0.6.0/metadata.nix new file mode 100644 index 0000000..2637cfa --- /dev/null +++ b/pkgs-temp/wlroots-0.6.0/metadata.nix @@ -0,0 +1,5 @@ +{ + rev = "3dec88e4555ee5fd95ffd69133623816cb0c25c4"; + sha256 = "1hcbxvy3a47gy4c1lg8avql79ddchgv8px11w4s3d6dl6pzfc5km"; + revdate = "2019-06-02T13:30:47Z"; +} -- cgit v1.2.3