-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,3 +111,6 @@ pyramid-incorrect.dat | |
|
||
# macOS | ||
.DS_Store | ||
|
||
# Nix | ||
result |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
description = "Open-source Star Tracker"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/release-24.05"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
|
||
flake-compat = { | ||
url = "github:edolstra/flake-compat"; | ||
flake = false; | ||
}; | ||
}; | ||
|
||
outputs = inputs@{ self, nixpkgs, flake-utils, ... }: | ||
let | ||
overlays = [ | ||
(final: prev: rec { lost = prev.callPackage ./nix/package.nix { }; }) | ||
]; | ||
in flake-utils.lib.eachDefaultSystem (system: | ||
let pkgs = import nixpkgs { inherit overlays system; }; | ||
in { | ||
packages.default = pkgs.lost; | ||
packages.lost = pkgs.lost; | ||
|
||
devShells.default = pkgs.mkShell { | ||
packages = with pkgs; [ | ||
gcc | ||
clang-tools | ||
gnumake | ||
bear | ||
gdb | ||
valgrind | ||
man | ||
groff | ||
imagemagick | ||
cpplint | ||
doxygen | ||
graphviz | ||
unixtools.xxd | ||
eigen | ||
cairo | ||
]; | ||
}; | ||
|
||
devShell = self.devShells.${system}.default; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ stdenv, pkgs, lib }: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "lost"; | ||
version = "0.1.0"; | ||
|
||
src = ./..; | ||
|
||
nativeBuildInputs = with pkgs; [ gcc gnumake groff unixtools.xxd eigen ]; | ||
|
||
buildInputs = with pkgs; [ cairo ]; | ||
|
||
dontConfigure = true; | ||
|
||
buildPhase = '' | ||
make release | ||
''; | ||
|
||
installPhase = '' | ||
mkdir -p $out/bin | ||
mv lost $out/bin/ | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Open-source Star Tracker"; | ||
homepage = "https://github.com/uwcubesat/lost"; | ||
license = licenses.mit; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(import | ||
( | ||
let | ||
flake-compat = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.flake-compat; | ||
in | ||
fetchTarball { | ||
url = "https://github.com/edolstra/flake-compat/archive/${flake-compat.locked.rev}.tar.gz"; | ||
sha256 = flake-compat.locked.narHash; | ||
} | ||
) | ||
{src = ./.;}) | ||
.shellNix |