File tree Expand file tree Collapse file tree 3 files changed +16
-28
lines changed
Expand file tree Collapse file tree 3 files changed +16
-28
lines changed Original file line number Diff line number Diff line change 1414 - uses : DeterminateSystems/nix-installer-action@main
1515 - uses : DeterminateSystems/magic-nix-cache-action@main
1616
17- - name : Build Nix Package
18- run : nix build .nix --print-build-logs
19-
20- build-without-resources :
21- runs-on : ubuntu-latest
22- permissions :
23- contents : read
24- steps :
25- - uses : actions/checkout@v4
26- - uses : DeterminateSystems/nix-installer-action@main
27- - uses : DeterminateSystems/magic-nix-cache-action@main
28-
29- - name : Build Nix Package Without Resources
30- run : nix build .nix#graphite-without-resources --print-build-logs
17+ - name : Build Nix Package Dev
18+ run : nix build .nix#graphite-dev --print-build-logs
Original file line number Diff line number Diff line change 100100 in
101101 {
102102 packages = rec {
103- default = graphite ;
104- graphite = ( import ./pkgs/graphite.nix {
105- pkgs = pkgs // { inherit graphene-raster-nodes-shaders ; } ;
106- inherit info inputs deps libs tools ;
107- } ) { } ;
108- graphite-without-resources = ( import ./pkgs/graphite.nix {
103+ graphiteWithArgs = args : ( import ./pkgs/graphite.nix {
109104 pkgs = pkgs // { inherit graphene-raster-nodes-shaders ; } ;
110105 inherit info inputs deps libs tools ;
111- } ) { embeddedResources = false ; } ;
106+ } ) args ;
107+ graphite = graphiteWithArgs { } ;
108+ graphite-dev = graphiteWithArgs { dev = true ; } ;
109+ graphite-without-resources = graphiteWithArgs { embeddedResources = false ; } ;
110+ graphite-without-resources-dev = graphiteWithArgs { embeddedResources = false ; dev = true ; } ;
112111 #TODO: graphene-cli = import ./pkgs/graphene-cli.nix { inherit info pkgs inputs deps libs tools; };
113112 graphene-raster-nodes-shaders = import ./pkgs/graphene-raster-nodes-shaders.nix { inherit info pkgs inputs deps libs tools ; } ;
113+
114+ default = graphite ;
114115 } ;
115116
116117 devShells . default = import ./dev.nix { inherit pkgs deps libs tools ; } ;
Original file line number Diff line number Diff line change 22
33{
44 embeddedResources ? true ,
5+ dev ? false ,
56} :
67
78let
4748 strictDeps = true ;
4849 buildInputs = libs . desktop-all ;
4950 nativeBuildInputs = tools . desktop ++ [ pkgs . makeWrapper ] ;
50- env = deps . cef . env ;
51- doCheck = false ;
51+ env = deps . cef . env // {
52+ CARGO_PROFILE = if dev then "dev" else "release" ;
53+ } ;
5254 cargoExtraArgs = "-p graphite-desktop${ if embeddedResources then "" else " --no-default-features --features recommended" } " ;
55+ doCheck = false ;
5356 } ;
5457in
5558
@@ -62,13 +65,9 @@ deps.crane.lib.buildPackage (common // {
6265 EMBEDDED_RESOURCES = resources ;
6366 } else { } ) ;
6467
65- buildPhase = ''
66- cargo build -r ${ common . cargoExtraArgs }
67- '' ;
68-
6968 installPhase = ''
7069 mkdir -p $out/bin
71- cp target/release/graphite $out/bin/graphite
70+ cp target/${ if dev then "debug" else " release" } /graphite $out/bin/graphite
7271
7372 mkdir -p $out/share/applications
7473 cp $src/desktop/assets/*.desktop $out/share/applications/
You can’t perform that action at this time.
0 commit comments