From d68ac2f4ceb11f61a633302e5cfb082cfbcd8da6 Mon Sep 17 00:00:00 2001 From: Gregory Bednov Date: Sat, 29 Aug 2026 08:19:16 +0300 Subject: [PATCH] flake.nix added --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..76e7ff9 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1787814960, + "narHash": "sha256-PYZq1qzCJXC2zGI0mH07vrZBsw6DRBAOX0jN1pPtqOQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "c27cdad491a991b11ed731760aa2ef8db0cb0410", + "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..222b19d --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "Surface relation extractor for OCCT"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable"; + }; + + outputs = + { self, nixpkgs }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.${system}.default = pkgs.mkShell { + buildInputs = with pkgs; [ + cmake + opencascade-occt + clang + ]; + }; + defaultPackage.x86_64-linux = pkgs.stdenv.mkDerivation { + pname = "OcctSurfacer"; + version = "1.0.0"; + src = ./.; + nativeBuildInputs = [ + pkgs.cmake + pkgs.opencascade-occt + ]; + + cmakeFlags = [ "-DBUILD_TESTING=OFF" ]; + }; + }; +}