Skip to content

libspng: init at 0.7.0-rc3#136274

Merged
happysalada merged 2 commits intoNixOS:masterfrom
akshatagarwl:libspng
Sep 8, 2021
Merged

libspng: init at 0.7.0-rc3#136274
happysalada merged 2 commits intoNixOS:masterfrom
akshatagarwl:libspng

Conversation

@akshatagarwl
Copy link
Member

Motivation for this change
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Aug 31, 2021
@happysalada
Copy link
Contributor

Result of nixpkgs-review pr 136274 run on x86_64-darwin 1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need different build steps here https://libspng.org/docs/build/
The default build step is running make. You'll probably need to include your custom buildPhase

When you build it, can you ls into ./result and give the content of the output ? just to make sure it build correctly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

result
├── include
│  └── spng.h
└── lib
   ├── libspng.so -> libspng.so.0
   ├── libspng.so.0 -> libspng.so.0.7.0
   ├── libspng.so.0.7.0
   └── pkgconfig
      └── spng.pc

From what I understand the meson build hooks run automatically. Not sure if this is a debug build or a release build. Also unsure if the checkPhase runs by default or not in this case

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was checking in libpng, I think you also have to define manually the outputs

  outputs = [ "out" "dev" ];
  outputBin = "dev";

I think the include stuff is supposed to be part of dev

the build runs in two ways, on the build thing it talks about a cmake way and a meson way. If you remove the meson dependency, does it still build ?

If you run the build with nix build .#libspng -L -vv it should give you more verbose output and you should see if the checkphase is running.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you remove the meson dependency, does it still build ?

It doesn't build without without meson or ninja

@happysalada Did a few changes. PTAL

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

does it produce two outputs result and result.dev
is the include directory correctly part of the result.dev ?
What is the output of the result ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkPhase is still not running as far as I can tell

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it even say anything in the logs ?
It should say that it's not checking.
Otherwise, you can try the doCheck = true;
If the checkPhase doesn't run then, it should say at least why in the logs.

@cdepillabout
Copy link
Member

Update from @DavHau: DavHau@f0b7bbb

@akshatagarwl
Copy link
Member Author

Cherry-picked and formatted the changes from @DavHau

@happysalada
Copy link
Contributor

Thank you!

@happysalada happysalada merged commit 172edcb into NixOS:master Sep 8, 2021
@akshatagarwl akshatagarwl deleted the libspng branch September 9, 2021 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants