uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
70
pkgs/applications/graphics/antimony/default.nix
Normal file
70
pkgs/applications/graphics/antimony/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{ lib, stdenv, fetchFromGitHub, libpng, python3
|
||||
, libGLU, libGL, qtbase, wrapQtAppsHook, ncurses
|
||||
, cmake, flex, lemon
|
||||
, makeDesktopItem, copyDesktopItems
|
||||
}:
|
||||
|
||||
let
|
||||
gitRev = "8fb4b0929ce84cf375bfb83a9d522ccd80681eaf";
|
||||
gitBranch = "develop";
|
||||
gitTag = "0.9.3";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "antimony";
|
||||
version = "2020-03-28";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mkeeter";
|
||||
repo = "antimony";
|
||||
rev = gitRev;
|
||||
sha256 = "1s0zmq5jmhmb1wcsyaxfmii448g6x8b41mzvb1awlljj85qj0k2s";
|
||||
};
|
||||
|
||||
patches = [ ./paths-fix.patch ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i "s,/usr/local,$out,g" \
|
||||
app/CMakeLists.txt app/app/app.cpp app/app/main.cpp
|
||||
sed -i "s,python3,${python3.executable}," CMakeLists.txt
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString stdenv.isLinux ''
|
||||
install -Dm644 $src/deploy/icon.svg $out/share/icons/hicolor/scalable/apps/antimony.svg
|
||||
install -Dm644 ${./mimetype.xml} $out/share/mime/packages/antimony.xml
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
libpng python3 python3.pkgs.boost
|
||||
libGLU libGL qtbase ncurses
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake flex lemon wrapQtAppsHook copyDesktopItems ];
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "antimony";
|
||||
desktopName = "Antimony";
|
||||
comment="Tree-based Modeler";
|
||||
genericName = "CAD Application";
|
||||
exec = "antimony %f";
|
||||
icon = "antimony";
|
||||
categories = [ "Graphics" "Science" "Engineering" ];
|
||||
mimeTypes = [ "application/x-extension-sb" "application/x-antimony" ];
|
||||
startupWMClass = "antimony";
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags= [
|
||||
"-DGITREV=${gitRev}"
|
||||
"-DGITTAG=${gitTag}"
|
||||
"-DGITBRANCH=${gitBranch}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A computer-aided design (CAD) tool from a parallel universe";
|
||||
homepage = "https://github.com/mkeeter/antimony";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ rnhmjoj ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
7
pkgs/applications/graphics/antimony/mimetype.xml
Normal file
7
pkgs/applications/graphics/antimony/mimetype.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="application/x-antimony">
|
||||
<comment xml:lang="en">Antimony model</comment>
|
||||
<glob pattern="*.sb"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
21
pkgs/applications/graphics/antimony/paths-fix.patch
Normal file
21
pkgs/applications/graphics/antimony/paths-fix.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
|
||||
index ddc5c9b..d80728a 100644
|
||||
--- a/app/CMakeLists.txt
|
||||
+++ b/app/CMakeLists.txt
|
||||
@@ -158,16 +158,6 @@ target_link_libraries(${ANTIMONY_APP}
|
||||
|
||||
################################################################################
|
||||
|
||||
-execute_process(COMMAND git log --pretty=format:'%h' -n 1
|
||||
- OUTPUT_VARIABLE GITREV)
|
||||
-execute_process(COMMAND bash -c "git diff --quiet --exit-code || echo +"
|
||||
- OUTPUT_VARIABLE GITDIFF)
|
||||
-execute_process(COMMAND git describe --exact-match --tags
|
||||
- OUTPUT_VARIABLE GITTAG
|
||||
- ERROR_QUIET)
|
||||
-execute_process(COMMAND git rev-parse --abbrev-ref HEAD
|
||||
- OUTPUT_VARIABLE GITBRANCH)
|
||||
-
|
||||
add_definitions(-D'GITREV="${GITREV}${GITDIFF}"'
|
||||
-D'GITTAG="${GITTAG}"'
|
||||
-D'GITBRANCH="${GITBRANCH}"')
|
||||
Loading…
Add table
Add a link
Reference in a new issue