1
0
Fork 0

Initial commit

This commit is contained in:
Daniel Kempkens 2021-12-14 18:54:48 +01:00
commit 7335b33553
5 changed files with 87 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
/result
/result-*

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1639442420,
"narHash": "sha256-GL4Q5gDXDHxLPZD1Rg8kk6M6S+NqxDjTu0XqGF/Xhuc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "69958994ab2c4c41f82db658ae6333b91079bcf6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

18
flake.nix Normal file
View file

@ -0,0 +1,18 @@
{
description = "Collection of (useful) tools";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }: {
packages = nixpkgs.lib.genAttrs
[
"aarch64-darwin"
"x86_64-darwin"
]
(system: import ./packages.nix {
inherit system;
pkgs = nixpkgs.legacyPackages.${system};
});
overlay = import ./overlay.nix;
};
}

8
overlay.nix Normal file
View file

@ -0,0 +1,8 @@
_: super:
let custom = super.callPackage ./packages.nix { }; in
{
inherit custom;
cliclick = custom.cliclick;
}

32
packages.nix Normal file
View file

@ -0,0 +1,32 @@
{ system, pkgs }:
{
cliclick = pkgs.stdenv.mkDerivation {
pname = "cliclick";
version = "5.0.1";
src = pkgs.fetchFromGitHub {
owner = "BlueM";
repo = "cliclick";
rev = "79a49ff25f550fda5b2a1806366aa9d7facc46f3";
sha256 = "Wj1niLXCwBYTsXB2Qkdvs85BJD7uRqGIerCTjhS20ZQ=";
fetchSubmodules = false;
};
NIX_CFLAGS_COMPILE = "-include cliclick_Prefix.pch -I Actions -I .";
buildInputs = (with pkgs; [
perl
]) ++ (with pkgs.darwin.apple_sdk.frameworks; [
Carbon
Cocoa
Foundation
IOKit
]);
installPhase = ''
mkdir -p $out/bin
cp cliclick $out/bin
'';
};
}