-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.nix
More file actions
71 lines (64 loc) · 1.79 KB
/
Copy pathbuild.nix
File metadata and controls
71 lines (64 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{ stdenv
, qtbase
, full
, cmake
, wrapQtAppsHook
, ffmpeg
, lib
, writeText
, clangStdenv
}:
let
version = "0.11.0";
simpleMediaEncoder-dist = stdenv.mkDerivation {
pname = "SimpleMediaEncoder-dist";
inherit version;
src = ./.;
stdenv = clangStdenv;
buildInputs = [
qtbase
full
];
nativeBuildInputs = [
cmake
wrapQtAppsHook
];
# Here, we're in the build directory so ../ is src
installPhase = ''
mkdir -p $out/share/applications
cp -a ../bin $out/bin
wrapProgram $out/bin/SimpleMediaEncoder \
--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
'';
};
desktopFile = writeText "SimpleMediaEncoder.desktop" ''
[Desktop Entry]
Version=${version}
Encoding=UTF-8
Name=SimpleMediaEncoder
GenericName=Simple media encoder
Type=Application
Categories=Multimedia;AudioVideo;Video;
MimeType=video/x-msvideo;video/x-matroska;video/webm;video/mpeg;video/mp4;
Terminal=false
StartupNotify=true
Exec=${simpleMediaEncoder-dist}/bin/SimpleMediaEncoder %f
Icon=svp-manager4.png
'';
in
stdenv.mkDerivation {
name = "SimpleMediaEncoder";
inherit (simpleMediaEncoder-dist) version;
phases = ["installPhase"];
installPhase = ''
mkdir -p $out/share/applications
ln -s ${simpleMediaEncoder-dist}/bin $out/bin
ln -s ${desktopFile} $out/share/applications/SimpleMediaEncoder.desktop
'';
meta = with lib; {
description = "Compress and convert your media files in a breeze with this convenient tool! Perfect for sending to Discord or Messenger, or reducing the size of music to listen on the go. Uses FFmpeg and Qt Widgets under GPL v3.";
homepage = "https://github.com/willbou1/simple-media-encoder";
platforms = ["x86_64-linux"];
license = licenses.gpl3;
};
}