nixpkgs/pkgs/tools/misc/ocs-url/default.nix
Jan Malakhovski 591ccfe5b9 treewide: noop: refer to src.name or similar where appropriate, part 3: more use cases
This continues where d8f7f6a5ce left off. Similarly
to that commit, this commit this also points `sourceRoot`s to `src.name` and similar
instead of keeping hardcoded names, and edits other derivation attrs do do the same,
where appropriate.

Also, similarly to d8f7f6a5ce some of expressions this
edits use `srcs` attribute with customly-named sources, so they have to be moved
into `let` blocks to keep evaluation efficient (the other, worse, way to do this
would to recurcively refer to `elemAt n finalAttrs.srcs` or, similarly, with `rec`).
2023-08-11 09:20:44 +00:00

47 lines
1,017 B
Nix

{ lib, stdenv, fetchgit, libsForQt5 }:
let
version = "3.1.0";
main_src = fetchgit {
url = "https://www.opencode.net/dfn2/ocs-url.git";
rev = "release-${version}";
sha256 = "RvbkcSj8iUAHAEOyETwfH+3XnCCY/p8XM8LgVrZxrws=";
};
qtil_src = fetchgit {
url = "https://github.com/akiraohgaki/qtil";
rev = "v0.4.0";
sha256 = "XRSp0F7ggfkof1RNAnQU3+O9DcXDy81VR7NakITOXrw=";
};
in
stdenv.mkDerivation rec {
pname = "ocs-url";
inherit version;
srcs = [ main_src qtil_src ];
sourceRoot = main_src.name;
# We are NOT in $sourceRoot here
postUnpack = ''
mkdir -p $sourceRoot/lib/qtil
cp -r ${qtil_src.name}/* $sourceRoot/lib/qtil/
'';
buildInputs = with libsForQt5.qt5; [
qtbase
qtsvg
qtquickcontrols
qmake
wrapQtAppsHook
];
meta = with lib; {
description = "Open Collaboration System for use with DE store websites";
license = licenses.gpl3Only;
maintainers = with maintainers; [ SohamG ];
platforms = platforms.linux;
};
}