aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2023-01-02 11:54:20 +0100
committerAdrian Kummerlaender2023-01-02 11:54:20 +0100
commit8649a521f6c6e073e75fb101f2546a016bb87dda (patch)
treeb29c02e3407a50c1eed98cc50e78e4f383aded1a
parentd864699c5ddd744ee7376c0d752b6bbb771429a2 (diff)
downloadcompustream-master.tar
compustream-master.tar.gz
compustream-master.tar.bz2
compustream-master.tar.lz
compustream-master.tar.xz
compustream-master.tar.zst
compustream-master.zip
Flakeify buildHEADmaster
-rw-r--r--CMakeLists.txt6
-rw-r--r--flake.lock27
-rw-r--r--flake.nix27
-rw-r--r--shell.nix20
4 files changed, 60 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5b8b141..f0a7fe4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,3 +32,9 @@ target_compile_features(
cxx_std_17
)
+install(
+ TARGETS
+ compustream
+ DESTINATION
+ bin
+)
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..42b6658
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,27 @@
+{
+ "nodes": {
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1659914493,
+ "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-21.05",
+ "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..9cd9e49
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,27 @@
+{
+ description = "compustream";
+
+ inputs = {
+ nixpkgs.url = github:NixOS/nixpkgs/nixos-21.05;
+ };
+
+ outputs = { self, nixpkgs, ... }: {
+ defaultPackage.x86_64-linux = let
+ system = "x86_64-linux";
+ pkgs = import nixpkgs { inherit system; };
+
+ in pkgs.stdenv.mkDerivation rec {
+ name = "compustream";
+
+ src = pkgs.lib.cleanSource ./.;
+
+ buildInputs = with pkgs; [
+ cmake
+ universal-ctags
+ glfw3
+ glew
+ glm
+ ];
+ };
+ };
+}
diff --git a/shell.nix b/shell.nix
deleted file mode 100644
index ce29a92..0000000
--- a/shell.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ pkgs ? import <nixpkgs> { }, ... }:
-
-pkgs.stdenvNoCC.mkDerivation rec {
- name = "compustream-env";
- env = pkgs.buildEnv { name = name; paths = buildInputs; };
-
- buildInputs = with pkgs; [
- cmake
- universal-ctags
- gcc8
- gdb cgdb
- glfw3
- glew
- glm
- ];
-
- shellHook = ''
- export NIX_SHELL_NAME="${name}"
- '';
-}