nixpkgs/pkgs/applications/office/treesheets/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

57 lines
1.6 KiB
Nix

{ lib, stdenv, fetchFromGitHub, wxGTK, makeWrapper }:
stdenv.mkDerivation rec {
pname = "treesheets";
version = "1.0.1";
src = fetchFromGitHub {
owner = "aardappel";
repo = "treesheets";
rev = "v${version}";
sha256 = "0krsj7i5yr76imf83krz2lmlmpbsvpwqg2d4r0jwxiydjfyj4qr4";
};
buildInputs = [ wxGTK makeWrapper ];
preConfigure = "cd src";
postInstall = ''
mkdir "$out/share" -p
cp -av ../TS "$out/share/libexec"
mkdir "$out/bin" -p
makeWrapper "$out/share/libexec/treesheets" "$out/bin/treesheets"
mkdir "$out/share/doc" -p
for f in readme.html docs examples
do
mv -v "$out/share/libexec/$f" "$out/share/doc"
ln -sv "$out/share/doc/$f" "$out/share/libexec/$f"
done
mkdir "$out/share/applications" -p
mv -v "$out/share/libexec/treesheets.desktop" "$out/share/applications"
substituteInPlace "$out/share/applications/treesheets.desktop" \
--replace "Icon=images/treesheets.svg" "Icon=$out/share/libexec/images/treesheets.svg"
'';
meta = with lib; {
description = "Free Form Data Organizer";
longDescription = ''
The ultimate replacement for spreadsheets, mind mappers, outliners,
PIMs, text editors and small databases.
Suitable for any kind of data organization, such as Todo lists,
calendars, project management, brainstorming, organizing ideas,
planning, requirements gathering, presentation of information, etc.
'';
homepage = "http://strlen.com/treesheets/";
maintainers = with maintainers; [ obadz avery ];
platforms = platforms.linux;
license = licenses.zlib;
};
}