1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 10:31:36 +00:00
nixpkgs/pkgs/applications/graphics/antimony/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

51 lines
1.3 KiB
Nix

{ lib, stdenv, fetchFromGitHub, libpng, python3
, libGLU, libGL, qtbase, wrapQtAppsHook, ncurses
, cmake, flex, lemon
}:
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
'';
buildInputs = [
libpng python3 python3.pkgs.boost
libGLU libGL qtbase ncurses
];
nativeBuildInputs = [ cmake flex lemon wrapQtAppsHook ];
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;
};
}