commit bb8628981535855264ed44f2907fa3f6b5f44b5f Author: brothermechanic Date: Thu Dec 8 20:49:53 2022 +0300 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..65fc40b --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# CG Overlay + +[![Cachix Cache](https://img.shields.io/badge)](https://brothermechanic.cachix.org) + +Computer Graphics media packages. diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..27163d3 --- /dev/null +++ b/default.nix @@ -0,0 +1,5 @@ +{ system ? builtins.currentSystem, pkgs ? import { inherit system; } }: + +rec { + cork = pkgs.callPackage ./pkgs/cork { }; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5a28b7d --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1670498129, + "narHash": "sha256-QOWbsKObHxNpBzrIVJrgR2TGQdwyYNFgBdoVCCvYuDU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "52665b05cfd702e12b877aa519b62374d003231a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..cb7200a --- /dev/null +++ b/flake.nix @@ -0,0 +1,19 @@ +{ + description = " Computer Graphics Overlay"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + outputs = { self, nixpkgs }: let + systems = [ + "x86_64-linux" + "i686-linux" + "x86_64-darwin" + "aarch64-linux" + "armv6l-linux" + "armv7l-linux" + ]; + forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); + in { + packages = forAllSystems (system: import ./default.nix { + pkgs = import nixpkgs { inherit system; }; + }); + }; +} diff --git a/pkgs/cork/default.nix b/pkgs/cork/default.nix new file mode 100644 index 0000000..c4b5a82 --- /dev/null +++ b/pkgs/cork/default.nix @@ -0,0 +1,41 @@ +{ lib, fetchFromGitHub, pkgs, stdenv }: +stdenv.mkDerivation rec { + pname = "cork"; + version = "unstable"; + + src = fetchFromGitHub { + owner = "gilbo"; + repo = "cork"; + rev = "5987de50801d1ce3dedc91307d478594459662d6"; + sha256 = "sha256-CmSq3vFddgFmSwjtGOI5s5imZMvsjNgPi43BdQxCNwI="; + }; + + nativeBuildInputs = [ ]; + buildInputs = [ + pkgs.clang + pkgs.llvm + pkgs.gmp + ]; + + installPhase = '' + mkdir -p $out/bin + mkdir -p $out/lib64 + mkdir -p $out/include + + cp bin/* $out/bin/ + cp lib/* $out/lib64/ + cp include/* $out/include/ + ''; + + meta = with lib; { + description = "Cork - a powerful standalone boolean calculations software"; + longDescription = '' + Cork is designed to support Boolean operations between triangle meshes. + ''; + homepage = "https://github.com/gilbo/cork"; + license = licenses.gpl3; + maintainers = [ "brothermechanic\u00e8s " ]; + platforms = platforms.all; + priority = 6; # resolves collision + }; +}