Skip to content

Commit

Permalink
Fix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
RitheeshBaradwaj committed Sep 17, 2023
1 parent 573e6f6 commit 08f27b9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
15 changes: 9 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,24 @@
src = self;
nativeBuildInputs = nativeBuildInputs;
buildPhase = ''
bazel build //src:hello-world;
bazel build //src:cosmos;
'';

installPhase = ''
mkdir -p $out/bin;
cp -r bazel-bin/src/hello-world $out/bin;
cp -r bazel-bin/src/cosmos $out/bin;
'';
};
in rec
{
defaultPackage = cosmos;
devShells.default = pkgs.mkShell {
nativeBuildInputs = nativeBuildInputs ++ [
cosmos
];

devShells = {
default = pkgs.mkShell {
packages = nativeBuildInputs ++ [
cosmos
];
};
};

# default = pkgs.devshell.mkShell {
Expand Down
4 changes: 2 additions & 2 deletions src/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@rules_cc//cc:defs.bzl", "cc_binary")

cc_binary(
name = "hello-world",
srcs = ["hello_world.cpp"],
name = "cosmos",
srcs = ["main.cpp"],
)
6 changes: 0 additions & 6 deletions src/hello_world.cpp

This file was deleted.

6 changes: 6 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <iostream>

int main() {
std::cout << "[Cosmos CLI]: Hello from Developers Cosmos!" << std::endl;
return 0;
}

0 comments on commit 08f27b9

Please sign in to comment.