nixpkgs/pkgs/os-specific/darwin/setfile/default.nix
Peter Simons e761405c50 os-specific/darwin/setfile: drop the "unfree" license
Setfile is included by other derivation, which in turns makes them unfree, too.
This causes plenty of evaluation errors on Hydra, i.e.:

  at `haskellPackages_ghc763_profiling.wx.x86_64-darwin' [nixpkgs = ..., officialRelease = false]:
  user-thrown exception: package ‘setfile’ has an unfree license, refusing to evaluate

Now, it's true that "setfile" is unfree, but this doesn't affect us: our
derivation doesn't include the actual binary -- it just contains a symlink to
"/usr/bin/SetFile". Arguably, our setfile derivation is free and we can
re-distribute it.
2013-09-11 13:08:46 +02:00

34 lines
880 B
Nix

{ stdenv }:
# this tool only exists on darwin
assert stdenv.isDarwin;
stdenv.mkDerivation {
name = "setfile";
src = "/usr/bin/SetFile";
unpackPhase = "true";
configurePhase = "true";
buildPhase = "true";
installPhase = ''
mkdir -p "$out/bin"
ln -s $src "$out/bin"
'';
meta = with stdenv.lib; {
description = "Set attributes of files and directories";
homepage = "http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/setfile.1.html";
maintainers = with maintainers; [ lovek323 ];
platforms = platforms.darwin;
longDescription = ''
SetFile is a tool to set the file attributes on files in an HFS+
directory. It attempts to be similar to the setfile command in MPW. It can
apply rules to more than one file with the options apply- ing to all files
listed.
'';
};
}