1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00
nixpkgs/pkgs/tools/misc/archi/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

62 lines
1.5 KiB
Nix

{ lib, stdenv
, fetchurl
, fetchzip
, autoPatchelfHook
, libsecret
}:
stdenv.mkDerivation rec {
pname = "Archi";
version = "4.7.1";
src =
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "https://www.archimatetool.com/downloads/archi/Archi-Linux64-${version}.tgz";
sha256 = "0sd57cfnh5q2p17sd86c8wgmqyipg29rz6iaa5brq8mwn8ps2fdw";
}
else if stdenv.hostPlatform.system == "x86_64-darwin" then
fetchzip {
url = "https://www.archimatetool.com/downloads/archi/Archi-Mac-${version}.zip";
sha256 = "1h05lal5jnjwm30dbqvd6gisgrmf1an8xf34f01gs9pwqvqfvmxc";
}
else
throw "Unsupported system";
buildInputs = [
libsecret
];
nativeBuildInputs = [
autoPatchelfHook
];
installPhase =
if stdenv.hostPlatform.system == "x86_64-linux" then
''
mkdir -p $out/bin
for f in configuration features p2 plugins Archi.ini Archi; do
cp $f $out/bin/
done
install -D -m755 Archi $out/bin/Archi
''
else
''
mkdir -p "$out/Applications"
mv Archi.app "$out/Applications/"
'';
meta = with lib; {
description = "ArchiMate modelling toolkit";
longDescription = ''
Archi is an open source modelling toolkit to create ArchiMate
models and sketches.
'';
homepage = "https://www.archimatetool.com/";
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ earldouglas SuperSandro2000 ];
};
}